GroupDocs Comparison: Compare Document Content and Formatting

How document comparison separates content changes from formatting changes, when ignoring styling differences helps or hides meaning, and how to check that results stay usable.

What a document comparison actually changes

GroupDocs Comparison is positioned as a tool for finding differences between two versions of a document. Unlike a text transformation, a comparison does not rewrite the source files. It reads both versions and produces a record of what differs. That record is typically a result document with marked insertions, deletions and modifications, or a list of detected changes. The original files remain the reference.

Evidence gap: the material available for this guide includes no verified documentation of GroupDocs Comparison's supported file formats, configuration options, output types, licensing or pricing. Where this article describes behavior, it describes how document comparison generally works. Confirm product-specific details in the current official documentation, or test them with your own files.

Content differences versus formatting differences

Content is the sequence of characters stored in the document. Formatting is how those characters are presented: font, size, weight, italics, color, spacing, alignment and similar properties. Changing "net 30" to "net 45" is a content change. Making "net 30" bold without changing the characters is a formatting change. Comparing "with ignored formatting differences" means asking the comparison to report only the first kind of change.

Changes that look like styling but alter content

Some edits look like formatting on screen but change the stored characters. Others change only the display. Before deciding whether a difference is substantive, it helps to know which kind of edit you are dealing with.

  • Unicode character substitution: so-called font generators often replace ordinary letters and digits with different code points, such as Mathematical Bold characters. The result looks bold, but a comparison sees different characters. It is a content change even when formatting is ignored.
  • Character-order reversal: reversing a string rewrites the order of the stored characters. Any comparison will report it as a content change.
  • Visual mirroring: flipping text with a CSS transform or a graphic effect changes only how it renders, and the stored characters stay the same. Whether a document comparison notices the change depends on whether the file format stores that transform at all.
  • Bidirectional display: right-to-left scripts are stored in logical order and reordered for display by the Unicode Bidirectional Algorithm. Two files can look different while holding identical characters. They can also look identical while one contains invisible directional control characters that a comparison treats as content.
  • Whitespace and invisible characters: non-breaking spaces, zero-width characters and different line endings can look identical on screen but differ at the character level.

Labels such as "mirror text" and "font generator" are loose terms. They do not tell you how a transformation was implemented. Inspect the actual characters before classifying a difference as content or styling.

Choosing between content-only and content-plus-formatting comparison

The right mode depends on what counts as a meaningful change for the document under review.

Criterion | Content-only comparison | Content plus formatting comparison
What is reported | Changes to stored characters | Changes to characters and to their presentation
Noise from re-saving or converting files | Low, because style drift is suppressed | Higher, because incidental style changes appear alongside real edits
Risk of missing meaningful changes | Formatting that carries meaning can be hidden | Lower, if formatting changes are surfaced
Unicode-styled look-alike text | Still flagged, because the characters differ | Flagged
Typical fit | Contract wording, policy text, data values, documents converted between formats | Layout and brand review, final typesetting checks, documents where emphasis or strikethrough carries meaning

Illustrative matched input. The expected results below follow from the definitions above. They are not observed output from GroupDocs Comparison or any other tool.

Version A:  Payment is due within 30 days.
Version B:  Payment is due within 30 days.   (the "30" set in bold via document formatting)
Version C:  Payment is due within 𝟑𝟎 days.   (Mathematical Bold digits U+1D7D1 U+1D7CE)

Expected, content-only:
  A vs B  ->  no differences
  A vs C  ->  one content change: "30" replaced by different characters

Expected, content plus formatting:
  A vs B  ->  one formatting change on "30"
  A vs C  ->  one content change

When ignoring formatting hides meaning

Content-only comparison assumes that presentation never changes meaning, and that assumption sometimes fails. If a superscript is stored as formatting, "10²" and "102" contain the same characters, so a content-only comparison treats them as identical. Strikethrough used to show deleted terms, hidden text, and bold that marks a defined term can also carry meaning. For documents like these, run a formatting-aware pass at least on the sections that matter, or use a content-only pass to locate edits and then review formatting in those passages.

Normalizing look-alike characters before comparing

Some workflows extract text before comparing it. In that case, Unicode compatibility normalization (NFKC) maps many styled look-alike characters to their plain equivalents, so cosmetic substitutions stop registering as content changes. Python's standard library shows the effect:

import unicodedata

text = "Payment is due within 𝟑𝟎 days."
print(unicodedata.normalize("NFKC", text))
# Payment is due within 30 days.

NFKC is a blunt instrument. It also folds the superscript character ² into a plain 2, along with other distinctions that may matter. Apply it to working copies, never to the originals, and only when every distinction it removes is one you intend to ignore. Whether a given comparison product accepts pre-normalized text, or offers an equivalent setting, has to be checked in its documentation.

Will the comparison result stay readable and usable?

A comparison result is only useful if reviewers can read it in the application where they will work. The following limits are general and depend on how a particular output is encoded, so verify each one in your destination.

  • Color-only change marking: if insertions and deletions are distinguished only by color, readers with color vision deficiencies or anyone printing in grayscale may not be able to tell them apart. Prefer output that also uses underline, strikethrough or a separate change list.
  • Assistive technology: whether a screen reader announces marked changes depends on whether they are stored as native revisions or as visual styling, and on the screen reader itself. Test with the software your reviewers actually use rather than assuming support.
  • Copy and paste: if deletions are rendered as struck-through text rather than as revisions, pasting into a plain-text destination drops the strikethrough. The old and new wording then run together. Check before reusing text from a result document.
  • Unicode-styled characters: styled code points can be read character by character or by name in some screen readers, and they may not match ordinary searches. Keep plain-text versions of the source content.
  • Format conversion: change markers that display correctly in one format may not survive export to another, such as conversion to PDF. Open the result in the final destination application before circulating it.

Sensitive documents: an online demo or cloud API requires uploading your files to a third party. For contracts, personnel records, unreleased financials or other confidential material, review the provider's data retention and processing terms first. The supplied evidence does not describe GroupDocs' data handling, so this needs separate confirmation. Alternatives include running a locally deployed library, if your license permits it, or testing with redacted copies.

Testing a comparison setup with your own files

  • Create a base document and save it.
  • Make a copy with formatting-only edits, such as bold, a font change or a spacing change.
  • Make a copy with one Unicode look-alike substitution and one whitespace change, such as a non-breaking space.
  • Make a copy with one superscript or strikethrough edit whose meaning depends on formatting.
  • Compare each copy against the base, both with formatting ignored and with formatting included, and record what each mode reports.
  • Open each result in the application, screen reader and export format your reviewers will use.