Skip to content
By profession6 min read

Journalists: How to Publish a Document Without Exposing Your Source

A leaked document can expose its source through metadata, printer dots or a failed redaction. Here is a safe routine to follow before you publish.

By Alexis de ONYRI

A leaked document can expose the person who leaked it, even after you delete their name. Hidden data inside the file, tiny marks left by a printer, and a black box that only looks solid can all point back to a source. The fix is a routine you follow every time, not a single click before you hit publish.

Take Jane Example, a reporter at a regional newspaper. A source emails her a scanned contract that proves a local official inflated invoices. Jane wants to publish the document itself, not just describe it, because readers trust what they can see. First, she has to strip out everything in the file that could point back to whoever sent it.

What hidden data can expose a source?

Every PDF, Word file and photo carries document properties most readers never see. These can include the author's name, the company account that created the file, a list of past edits, and the exact place where a photo was taken. A source who typed a report at work may leave their real name in the file's properties, without ever typing it into the visible text.

Printed pages carry their own trace. Many color laser printers add a grid of tiny yellow dots to each page. The Electronic Frontier Foundation decoded this pattern for one printer family and found it can encode the printer's serial number and the exact time of printing.

In 2017, The Intercept published a scanned NSA document. According to the Freedom of the Press Foundation, a crease in the page helped identify the source, Reality Winner. The Electronic Frontier Foundation notes that the same document carried yellow printer dots too, which can reveal a printer's serial number and print time.

Why do redactions fail?

A black rectangle drawn over a paragraph often just sits on top of the text. The words underneath stay inside the file's text layer, so anyone can select and copy them. In January 2019, lawyers for Paul Manafort filed a court document redacted this way. Reporters highlighted the black bars, copied the hidden text, and published new details of the case, according to the ABA Journal.

Flattening fixes this. It turns each page into a picture, so no text layer is left underneath the mask. A flattened file looks identical to the original page, but nothing inside a blacked-out area can be selected, searched, or pasted anywhere.

What is a safe routine for publishing a document?

Treat every document from a source the same way, even on a tight deadline. This short routine catches most of the risks above, in order.

  1. Re-image or retype the document: print it and rescan it as a flat image, or retype the key facts, so hidden metadata from the original file does not survive
  2. Mask names, contact details, account numbers, and any other detail that could identify a person, including your source
  3. Flatten the result into a new file, so the marks sit on a picture and no text layer remains underneath
  4. Rename the file with a generic name before you save it or send it to anyone
  5. Open the final file on a different device and check every page, plus the file's properties, before you publish it
Document typeMain riskWhat to do
Original file from a sourceAuthor name and edit history in the propertiesStrip the properties, then flatten before you share it further
Page you print and scan yourselfYellow tracking dots from a color laser printerRetype the content, or use a plain black-and-white printer instead
Photo of a printed pageLocation data and device details in the photo's metadataRemove the metadata, or retype the text instead of sharing the photo
Word documentTrack changes and comments left by past editorsConvert it to a flattened PDF, and never send the original .docx file
Where the risk usually hides

Does the law protect a source once a document has already leaked?

In France, the law of 4 January 2010 lets a journalist refuse to name a source in court, unless a judge finds an overriding public interest, according to the French Senate. In Germany, Section 53 of the Code of Criminal Procedure gives journalists the same right about an informant's identity, according to the Federal Ministry of Justice's official text. Neither law can undo a leak that already happened through metadata or a printer's tracking dots.

A tool can help with part of this routine. ONYRI Sanitize turns a document into a new, flattened PDF inside your browser: the original text layer, comments and properties do not carry over, and nothing under a mask stays selectable. Its limits: it does not strip printer tracking dots from a scan, and the download keeps the source file's name, so rename it yourself.

None of this replaces judgment. A masked document still needs a human check before it goes out, and the safest file is often the one you retyped rather than the one you were sent. The law protects what happens in court. The file itself has to hold up before that.

Frequently asked questions

Can I just draw a black box over text in a PDF to redact it?

No, not safely. A drawn box often sits on top of the text, and the words underneath can still be selected and copied. Flatten the page into an image after masking, so nothing stays hidden underneath a box that only looks solid.

Do printer tracking dots appear on black-and-white pages too?

Usually not. The Electronic Frontier Foundation's research points to color laser printers using yellow toner as the source of this pattern. A page printed in plain black and white, or on most inkjet printers, is far less likely to carry it.

Does French or German law protect me if metadata reveals my source?

Both countries let a journalist refuse to name a source in court, under France's 2010 law and Germany's Section 53 of the Code of Criminal Procedure. Neither law can undo a leak. Once metadata or a tracking dot has pointed to someone, the legal protection does not change what already happened.

What is the safest way to receive a sensitive document from a source?

Ask for the facts retyped, or the pages rescanned as flat images, rather than the original file. This strips most hidden metadata before it ever reaches you, so you are not the one cleaning it up under deadline pressure.

Sources & references

  1. Printer TrackingElectronic Frontier Foundation
  2. Metadata 101: Understanding the Basics of Media MetadataFreedom of the Press Foundation
  3. Source ProtectionFreedom of the Press Foundation
  4. Paul Manafort's Attorneys Failed at Redacting: Learn How to Do It RightABA Journal

Mask a document without uploading it

ONYRI Sanitize finds names, identifiers, bank details and secrets in a PDF, a Word file or a scan, and masks them in your browser. You check the preview, then download a flattened copy.