ModelAtlas
Guides

How to compare PDF versions offline when pages have shifted

If a revised PDF has a new cover or an extra page, compare the same section in both files instead of comparing them by page number. Start with a local PDF reader or a text comparison. You don’t need an AI model just to find the changed wording.

Match the section, not the number printed on the page

Keep both originals and label them old and new by revision, not by the order you opened them. Search each PDF locally for a distinctive heading or phrase in the section you need. Compare the nearby text too, especially if that heading appears in the table of contents or repeats. Record the page’s position in each file, counting from the first page. A printed page number or a viewer’s page label may not match that position. After another insertion or deletion, don’t assume the same offset still applies.

Compare text when you need wording, not appearance

For one short section, reading the two pages side by side is enough. For more text, if Poppler and Git are already installed, extract the pages you matched into two new text files and compare those. In this imaginary example, Equipment return is the third page of old.pdf and the fourth page of new.pdf:

pdftotext -f 3 -l 3 old.pdf old-page-3.txt
pdftotext -f 4 -l 4 new.pdf new-page-4.txt
git --no-pager diff --no-index --no-ext-diff --no-textconv -- old-page-3.txt new-page-4.txt

The last command compares the two local text files without starting a Git project. Use unused output names and compare only after both exports succeed. Git exits with 1 when the exports differ, not because comparison failed; 0 means the extracted text matched. The result points to lines to check, not facts verified against the PDF. If the export is blank or garbled, don’t treat a blank comparison as ‘no changes’: compare the pages visually or use permitted offline text recognition and recheck the originals.

Separate a moved section from a changed instruction

In our fictional guide, old file page 3 says ‘Return tool kits by 18:00.’ New file page 4 says ‘Return tool kits by 16:00.’ The cover changed the section’s position, but the earlier cutoff is a separate content change. Keep one note with the heading, both file positions and the two exact phrases. If borders, images, handwritten notes or column position matter, also inspect the original pages visually. A match in extracted text does not prove that two pages look the same or that the rest of either PDF is unchanged.

Use local AI only if there’s something left to explain

If you want a short summary, pass only your checked notes or excerpts to an approved local model. Ask it to distinguish the confirmed wording change from the page move, and to leave out anything not in the notes. Review that summary against the two PDFs before sharing it. When the material must stay on the device, don’t send the excerpts to an online summarizer, and keep the text exports and notes in an unsynced local folder. If you don’t know whether your computer can run a model, you can still finish the comparison without one.

Sources