TPTruPDF

@trupdf/compare

Document compare

Text diff + pixel-XOR visual diff · changes-only view

Side-by-side comparison with word- and line-level text diff plus a luminance-aware visual diff for layout changes that text alone misses.

F.01 — What you get

  • diffWords / diffLines with custom token map so boundaries align cleanly.
  • visualDiff: pixel-XOR with blue (removed) / red (added) / grey (unchanged) overlay.
  • changesOnly() filter for review-only views.
  • ComparePanel React component drops into any host.

Next step

See it in the demo

The live demo wires this feature into a full viewer. Open any PDF and try it.