Skip to content
PDF

A PDF knows what made it, and when.

PDF metadata lives in two places, and one of them is sometimes out of reach. This page says exactly what is read, what is blanked, and when you should not treat the result as clean.

The Info dictionary

The original PDF metadata, a small dictionary the trailer points to.

Author
Usually the account name of whoever exported the file.
Creator
The program the document was written in: Word, InDesign, a browser.
Producer
The library that wrote the PDF, with its version.
Title, Subject, Keywords
Often the original file name, including a draft number or a client name.
CreationDate, ModDate
To the second, with time zone.

The XMP packet

An XML stream in the document catalog, written by most modern producers.

dc:creator, dc:title
Author and title again, as text.
xmp:CreatorTool, pdf:Producer
The software, again.
xmp:CreateDate, xmp:ModifyDate, xmp:MetadataDate
The dates, again.
xmpMM:DocumentID, xmpMM:InstanceID
Identifiers that link this file to the versions before it.

What is blanked, and what is not.

Every value in the Info dictionary, and every value in an uncompressed XMP packet, is overwritten in place with spaces of the same length. Same length matters: a PDF is a table of byte offsets, and a file whose values are blanked without moving anything opens exactly as before. Every copy of the Info dictionary is treated, including the ones left behind by incremental saves.

An XMP packet that has been compressed, which is what Word and Acrobat usually write, is detected and shown, but it is not opened. Blanking it would mean re-compressing the stream and rewriting the cross-reference table, and that is not done yet. The result says "shown and kept" for that row and counts it in the after figure.

Metadata inside compressed object streams, which newer producers use for the whole file, is neither read nor removed. When a file has object streams and no readable Info dictionary, the result says to treat the file as not cleaned. This is the one format where FileSanity may not finish the job, and it tells you when that is so.

If a PDF has to be clean, the sure way is to print it to a new PDF, which drops the old metadata with the old structure, and then clean the new file here.

Clean a PDF, and read what the result says.

Drop it on the home page. If a compressed stream is kept, the page tells you so.