Anonymise documents for a PDF evaluation safely

13 July 2026

A brass padlock on a chain with a key in its lock.
Illustrative photograph. Resized with neutral margins. Photo: “Padlock with chain.jpg” — Lacz02 / Wikimedia Commons. · CC BY-SA 4.0

If a proposed evaluation file contains a real address and a hidden comment, keep it out of the test queue. When the evaluation concerns layout rather than the original facts, build a new, authorised synthetic file that reproduces the relevant features. Start from a clean source so the private comment is never copied into the test asset.

Preserve the difficulty of the task

Write down what matters before replacing the content. For this example it might be a multi-line address that nearly wraps, narrow spacing beside a table and a comment attached to a precise sentence. Create invented strings of comparable visual length in the same layout. If comments are part of the test, add a fresh comment containing only a distinctive harmless marker. Removing the real comment and leaving the file without any annotation would make it unsuitable for an annotation-preservation test.

Feature to testEvidence in the synthetic replacement
Line wrappingRender the new file and compare line count, available width and relevant page breaks.
Text extractionCheck that the invented address and surrounding labels extract in the intended order.
Annotations or metadataInspect author information, comments, attachments and embedded content. Document which harmless markers are deliberately present.

Admit the exact checked file

Inspect the actual exported PDF as well as the source used to create it. A visual pass alone cannot identify hidden comments or personal metadata. The National Archives’ redaction toolkit discusses the risk of retaining hidden information in electronic records.

Record the synthetic file’s digest, creator, permitted use, checks performed and which layout features it represents. If a technically difficult feature could not be replicated safely, state that gap and exclude it from conclusions. Admit only the identified synthetic revision to the evaluation, keeping the original in its authorised location.

Part of the Freeze a PDF test corpus with checksums and reference files guide.

Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).