Someone sends you an invoice, a signed contract, or a bank statement as a PDF. Is it the file that was originally produced, or has someone been in it since?
PDFs are unusually talkative about this. The format was designed so that edits get appended rather than rewritten, which means a modified file often carries its own history inside it. Here's what to look for, and where the signals lie to you.
The big one: incremental updates
A PDF ends with a cross-reference table, a trailer, and the marker %%EOF. When a well-behaved editor changes something, it doesn't rewrite the file — it appends the changed objects, a new xref section, a new trailer, and a second %%EOF.
So the crudest possible check is just counting:
function countRevisions(bytes) { const text = new TextDecoder('latin1').decode(bytes); return (text.match(/%%EOF/g) || []).length; } More than one %%EOF means the file has more than one revision. The trailer tells you how they chain:
trailer << /Size 412 /Root 1 0 R /Prev 85213 /ID [<A1B2...> <9F8E...>] >> /Prev is a byte offset pointing back at the previous xref section. Follow that chain and you can count the revisions and, with a bit more work, reconstruct what each one looked like — the earlier version of the text is frequently still sitting in the file, unreferenced but intact.
That last part is what surprises people. "Deleting" a paragraph in many editors just means the new revision stops pointing at the old object. The bytes don't go anywhere.
The /ID pair
That /ID array in the trailer holds two strings. Per the spec, the first is a permanent identifier assigned when the file was created and should survive edits; the second is updated each time the file changes. If the two differ, the file has been modified since creation. If a tool has rewritten both to be identical on a file with multiple revisions, that's its own kind of signal.
Metadata that contradicts itself
The document info dictionary and the XMP metadata both carry timestamps:
/CreationDate (D:20260103142211+05'00') /ModDate (D:20261118091455+05'00') /Producer (Acrobat Distiller 11.0) Three things worth checking:
-
ModDatelater thanCreationDate— modified, obviously. -
ProducerorCreatornaming a different tool than the one that made the rest of the file's structure. An invoice generated by a reporting library that now says it was produced by a desktop PDF editor is a strong tell. - The info dictionary and the XMP packet disagreeing with each other. Some editors update one and forget the other.
None of this is tamper-proof — all of it is editable. Which is exactly why you check it against the structural evidence rather than trusting it alone.
Font subsets
This one is subtle and hard to fake accidentally. PDF producers usually embed subsets of fonts — only the glyphs actually used — and tag them with a six-letter prefix:
/BaseFont /ABCDEF+Helvetica When someone edits text in an existing PDF, the editor often can't extend the original subset, so it embeds a second subset with a different prefix, or falls back to a system font. A document where one line of a paragraph uses /XYZWVU+Helvetica while every other line uses /ABCDEF+Helvetica is telling you which line was retyped.
Cover-ups
The low-effort redaction: draw a white rectangle over a number. The original text is still in the content stream, still extractable, sitting underneath a filled path. If you extract the text layer and find values that don't appear in the rendered page — or find text whose position overlaps an opaque filled rectangle drawn after it — you've found a cover-up rather than an edit.
What does not prove tampering
This is the part most "is my PDF edited" write-ups skip, and it's where false accusations come from:
- Linearization (optimising a PDF for web view) rewrites structure and can produce multiple revisions on a file nobody edited.
- Digital signatures are implemented as incremental updates. A signed PDF has at least two revisions by design. More revisions after the signature is the thing to look at, not the count itself.
- Scanners and OCR routinely re-save and add a text layer, changing
ProducerandModDate. - Password removal or flattening changes the file wholesale without touching a word of content.
So "this PDF has three revisions" is a question, not a verdict. The useful output is what changed between them, which is why comparing the reconstructed revisions beats counting them.
Doing it without uploading the file
The awkward part of all this is that the documents you most want to check — contracts, statements, medical records — are exactly the ones you shouldn't be uploading to a random website to find out.
That's the itch I built PickyPDF to scratch: the PDF parsing all runs in the browser, so the file never leaves the device. The PDF Edit Checker walks the /Prev chain, reconstructs the earlier revisions, and diffs the text between them so you can see what actually changed, instead of a yes/no that you have to take on faith. The rest of the PDF tools work the same way — no upload, no account.
If you want to poke at the structure yourself first, qpdf --qdf --object-streams=disable file.pdf out.pdf will decompress a PDF into something you can read in a text editor. It's a genuinely good afternoon.
What's the weirdest thing you've found buried in a PDF?

