BASALT · JOURNAL

How to check a PDF for a hidden watermark that identifies you

2026-10-30 · pdf hidden watermark

To check a PDF for a hidden watermark, look in five places: text that extracts but doesn't show, optional layers, metadata fields, link addresses and the wording of the pages themselves. On a Mac, mdimport -t -d3 prints the text Spotlight extracts, including invisible text, and a copy of the file expanded with qpdf lets you search for your own name or email. No check proves a file is unmarked.

A watermark that identifies a recipient is usually meant to survive a casual look, and some sit in the page image itself, where file inspection can't see them. The checks below tell you what your own copy carries, for example before you forward a report you were sent.

Where a copy can be marked for one recipient

A publisher who wants to know which copy leaked has several options, and a single file may use more than one.

The last one is the limit. Marks of that kind can't be found by looking at a file's structure, and none of the checks below detects them.

See what extracts but doesn't show

Many hidden marks are text, so start with the text. Spotlight reads a PDF's text layer, and a test import prints it without indexing the file:

mdimport -t -d3 document.pdf

Look for a line called kMDItemTextContent. On macOS 15, that text included invisible render-mode-3 text, white text and half-point text. Text placed outside the page area didn't appear, so a mark parked off the page needs the qpdf step below.

Compare the output with what you see on screen. Any name, email address or code you don't recognize in the extracted text is a reason to look closer.

Search an expanded copy for your own name

Content streams are often compressed, so a plain search of the raw file often finds nothing. Install qpdf (brew install qpdf) and write an uncompressed copy. The command makes a new file and leaves the original alone.

qpdf --qdf --object-streams=disable document.pdf expanded.pdf

Then search the copy for your name and your email, using your own:

grep -a -n -i 'your.name@example.com' expanded.pdf

For a sample file with a recipient's name in invisible text, a custom metadata key and a link, a search of the expanded copy found the name in all three, and the same search of the compressed original found nothing. That's why the expanded copy matters. A name can also be stored in an encoded form, such as UTF-16, so a miss isn't proof either.

To see every web address the links point to, and any layers the file defines:

grep -a -o '/URI *([^)]*)' expanded.pdf
grep -a -c '/OCProperties' expanded.pdf

A non-zero count for /OCProperties means the file defines optional layers. A web address with a long code in it isn't wrong, but it may identify the copy, because clicking the link sends that code to the server. Whether a PDF can be tracked is a separate question that the file alone can't settle.

Read the metadata

Open the file in Preview and choose Tools > Show Inspector. General Info shows the author, creator and producer, and the Keywords pane shows keywords. Those are standard fields. To see custom keys, print the information dictionary with qpdf, using the number from the trailer:

qpdf --show-object=trailer document.pdf
qpdf --show-object=6 document.pdf

A key that isn't one of the standard names, such as a /Recipient, is worth a look. The XMP packet is a second place to check, and none of Preview's Inspector panes shows it. How to see a PDF's metadata on a Mac shows how to print it.

Compare two copies if you can get them

The most reliable way to find a per-copy mark is to put two recipients' copies side by side. If you and a colleague were sent the same report, compare them. Two files with the same visible content often have different checksums, because dates and identifiers differ, so a different checksum shows very little.

shasum -a 256 copy-a.pdf copy-b.pdf

Instead, compare the extracted text. These commands write a text file for each copy, one line per line of text, and then show only what differs.

mdimport -t -d3 copy-a.pdf | grep kMDItemTextContent | sed 's/\\n/\
/g' > a.txt
mdimport -t -d3 copy-b.pdf | grep kMDItemTextContent | sed 's/\\n/\
/g' > b.txt
diff a.txt b.txt

With two sample copies that differed only in an invisible line, diff printed that line and nothing else. Any difference in the output is something one copy has and the other doesn't. If the text matches, run the metadata and link commands above on each copy and compare what they print, rather than comparing the expanded files byte by byte, which differ anyway. Checking whether two PDFs are identical goes further into why identical-looking files differ.

What to do with what you find

A watermark or identifier can be a condition of a license or an agreement, so finding one doesn't mean it's a problem. It means you know what the copy says about you. If a mark names you and you intend to share the file, decide whether sharing is allowed first.

For files you made, the same checks tell you what you're about to send. Hidden text in a PDF covers removing text you didn't intend to include. Don't use these steps to strip a publisher's mark from a document you aren't entitled to redistribute.

Frequently asked questions

How do I check if a PDF is watermarked?

Open it and look at every page for faint text, then print the extracted text with mdimport -t -d3 document.pdf and compare it with what you see. Check the document properties in Preview's Inspector too. This finds text and metadata marks. It can't find a mark built into the page image itself.

How do I detect an invisible watermark in a PDF?

Print the file's extracted text, because invisible text still extracts, then search an expanded copy made with qpdf for your own name or email. Neither step can detect a watermark in the pixels or in the exact spacing of letters. Those marks need the publisher's own detector, if there is one.

Can a PDF have a watermark that you can't see?

Yes. It can be text drawn invisibly, a layer that's switched off, a metadata field, a link address with a code in it, or a change in the image data. The first four can often be found with the file checks above. The last can't be found by inspecting the file.

Does Preview show hidden watermarks?

Not directly. Preview shows what the file draws, plus standard properties in its Inspector, so invisible text doesn't show on the page and the XMP packet has no pane of its own. Don't count on it for text you can't see. Use the extracted text from mdimport -t -d3 instead.

Can I find a watermark by comparing two copies of a PDF?

Often, yes. Extract the text of each copy and run diff on the two. A differing line, a different link address or a different metadata value points to a per-copy mark. A different checksum alone proves little, since dates and identifiers change between any two saves.

Is a watermark the same as metadata?

No. A watermark is content drawn on or hidden in the pages, such as text, an image or a layer. Metadata is information stored about the document, like its author. Either can be used to identify a copy, and both are worth checking.

Will removing metadata remove a hidden watermark?

Only if the mark was in the metadata. Invisible text, layers and image marks are page content and stay. Clearing metadata removes the author, title, keywords and XMP, and a mark kept anywhere else survives it.

Doing it in Basalt

Basalt doesn't detect watermarks. Its Inspect tool reports optional layers, ActualText entries, filled document properties, an embedded XMP packet and annotations on any PDF, each with a severity and a plain explanation, without quoting what it found. Those are places a mark can sit, but a hidden or image watermark won't be reported as one, and Inspect doesn't look for invisible, white or tiny text at all, so the Terminal steps above stay necessary. The Compare tool takes two copies and lists the added, removed and changed lines page by page, which is the quickest way to see a difference in wording. Basalt runs on your Mac and nothing is uploaded. It's $29 once for up to three Macs, free for 24 hours.

Redaction that proves itself

Basalt destroys the content you mark, then re-opens the file it wrote and proves the content is gone before it saves anything. Your documents never leave your Mac.

DOWNLOAD BASALT 2.3.2 BUY $29 FREE FOR 24 HOURS · MACOS 13+