Skip to content
HTKapp
Browse the documentation

Comparison module

The Comparison module shows your document side by side with another version — the original as it sits on disk, or any other PDF — so you can see what changed. It lives in the General category of the Dashboard, next to History, which it complements: History goes back in time, Comparison puts two states face to face.

The module never modifies the document. You can open it at any time, including on a document you have not saved yet — that is actually its first use.

Comparing with the original

When it opens, the left pane, Original, shows the document as it is saved on disk; the right pane, Modified, shows the document you are working on, with every unsaved change. If you have just deleted a page, applied a watermark or reordered the document, the difference is plain to see.

The two panes are linked:

  • page changes are synchronised — moving to page 3 on one side brings the other along;
  • zoom and fit-to-window, driven from the Navigation section of the sidebar, apply to both panes together;
  • scrolling within a page stays free on each side, so you can examine a detail without losing the other view.

Comparing with another file

The Open another file… button in the Comparison source section replaces the original with the PDF of your choice. The left pane then takes that file's name. This is how you confront two versions received separately — a contract and its amendment, two revisions of a report.

Once a file is chosen, a second button appears: Compare text (Diff).

The text diff

This button extracts the text of both documents, computes their differences and presents them in a dedicated sheet: deleted and added passages are highlighted, line by line, under the names of the two files.

Three limits, which follow from how it works:

  • it compares text, and text only. A moved image, a changed layout, a replaced font will not show up if the words are the same;
  • it reads the PDFs' native text, without optical recognition. A scanned document has no text to compare: run it through the Text extraction module first with the Use OCR option, and save the result;
  • it stops at the first 5,000 lines of each document; beyond that, the rest is not compared — for a longer text, split first (Split module).

The Diagnostic module will tell you in one line whether your documents carry a text layer.

Good practice

  • Before saving: a pass through Comparison confirms that the changes are the ones you meant — and only those.
  • Two files from different sources: compare them visually first, then run the text diff if the pages look too alike to decide by eye.
  • After flattening or redacting: the text diff shows precisely what has left the text.

Screenshots

1 screenshot — click to enlarge