Guide
What Metadata Do Public PDFs Carry? A Study of 2009-Era US Government Documents
By Happy Turtle Tech · Published · Updated
Part of the topic Clean a PDF Before You Share It
We read 4,641 PDFs from a fixed sample of 2009-era US government documents and counted what each one carried besides its pages. 99% had at least one text field filled in (title, author, subject, keywords, creating software), 65.7% named an author, and 7.9% had a file path, an e-mail address or a network path inside one of those fields. This describes this sample. It is not a claim about PDFs made today.
We then ran HerePDF's own Metadata and Remove Hidden Data tools over the same files, with every option switched on, and searched the results for what was supposed to be gone. The study found two gaps in our own tool; both are fixed, and the section below says what they were.
How the sample was chosen
GovDocs1 is a public research collection of about a million web documents published by US federal agencies, gathered in 2009 and split into 1,000 numbered zip files of random documents each. We took 20 of them, every 50th (000, 050, 100 and so on up to 950). The rule was fixed before we looked at a single result, and the SHA-256 checksum of each zip is in the data file published with this study, so anyone can check they are using the same files.
The 20 zips held 19,693 files, of which 4,840 were PDFs; the rest were other kinds of document and were not looked at. Of the PDFs, 4,641 could be analysed. 199 could not: 197 were password-protected and 2 failed to load (parse-error). Every percentage below is out of the 4,641 that were analysed.
What was measured
Each file was read with HerePDF's own code, so the figures are what its tools would show you. For each file only yes-or-no answers, counts and categories were kept. A name or a path was read to decide a flag and then discarded: none appears in this page or in the published data. To check the reading itself, 200 files chosen by a fixed rule were read again with a different PDF reader (PDF.js), and the two agreed on 199 of 200. We read each of the 1 difference by hand: 1 was a file with a real XMP block that PDF.js did not parse.
The document properties
Every PDF can carry a small set of properties: title, author, subject, keywords, the program that made the content and the program that wrote the file, and two dates.
| What was looked for | PDFs |
|---|---|
| At least one text field filled in | 4,594 of 4,641 (99%) |
| Title | 3,558 of 4,641 (76.7%) |
| Author | 3,048 of 4,641 (65.7%) |
| Subject | 919 of 4,641 (19.8%) |
| Keywords | 407 of 4,641 (8.8%) |
| Created with (Creator) | 3,910 of 4,641 (84.2%) |
| Produced by (Producer) | 4,492 of 4,641 (96.8%) |
| Creation date | 4,580 of 4,641 (98.7%) |
| Modification date | 4,001 of 4,641 (86.2%) |
| Extra custom properties | 730 of 4,641 (15.7%) |
A second copy: XMP
Many files carry a second, separate block of the same kind of data (XMP). It can disagree with the first: someone clears the Author in one place and not the other.
| What was looked for | PDFs |
|---|---|
| Has an XMP block | 2,882 of 4,641 (62.1%) |
| XMP creator differs from the Author property (of those that have both) | 201 of 1,553 (12.9%) |
| XMP title differs from the Title property (of those that have both) | 246 of 1,732 (14.2%) |
Text that looks like paths and addresses
A title or creator field often holds whatever the program put there. We counted files where one of the fields contained text that looks like a local file path, an e-mail address or a network path. We did not record what any of them said.
| What was looked for | PDFs |
|---|---|
| A file path such as C:\..., /Users/... or Macintosh HD:... | 297 of 4,641 (6.4%) |
| An e-mail address | 54 of 4,641 (1.2%) |
| A network path such as \\server\share | 17 of 4,641 (0.4%) |
| Any of the three | 368 of 4,641 (7.9%) |
Edit history and what else was inside
| What was looked for | PDFs |
|---|---|
| Saved again after the first save, with the earlier version still in the file | 604 of 4,641 (13%) |
| Saved again more than once | 178 of 4,641 (3.8%) |
| Contains JPEG photos | 1,231 of 4,641 (26.5%) |
| ...of those, a photo with camera data (Exif) | 31 of 1,231 (2.5%) |
| ...of those, a photo with a GPS location | 2 of 1,231 (0.2%) |
| Has attached files | 131 of 4,641 (2.8%) |
| Has scripts | 31 of 4,641 (0.7%) |
| Has comments or markup | 57 of 4,641 (1.2%) |
| Has page thumbnails or program-private data | 951 of 4,641 (20.5%) |
| Has typed form answers | 25 of 4,641 (0.5%) |
The programs behind the files
Counting by the family of program named in the Creator and Producer fields:
| Family | Creator | Producer |
|---|---|---|
| Windows print driver | 24.7% | 0% |
| other | 22.7% | 9.4% |
| Microsoft Office | 22% | 0.5% |
| none | 15.8% | 3.2% |
| Adobe other | 9.3% | 0.3% |
| Adobe Acrobat/Distiller | 3.6% | 80.9% |
| Scanner/capture | 1.1% | 0.8% |
| LaTeX | 0.8% | 0.5% |
What HerePDF's tools left behind
For each of the 4,641 files that loaded, the Metadata tool ran with every property cleared, the XMP block removed and photo data stripped. Remove Hidden Data then ran on its output with every category switched on. We opened the results as a determined reader would, loading every object, including any the file no longer uses. The check is structural, so a title that is also written on a page, or a bookmark with the same words, does not count.
We looked for: an XMP block, camera data in embedded photos, attached files, scripts, comments and markup, and copies of the document properties anywhere in the file. We did not scan for page thumbnails and program-private data, or for the form answers the run also cleared, so the results say nothing about those. The test ran on the same 4,641 files as the tables above. 199 PDFs were left out of the test: 197 are password-protected and the rest could not be read at all.
After both tools, 4,639 of 4,641 files had none of the items listed below left, and no tool run lost a page. In the other 2, this was left:
| An XMP block inside other embedded data (an image or an EPS file) | 2 of 4,641 |
After the Metadata tool alone, before Remove Hidden Data ran:
| A source document's properties kept in the page structure | 27 of 4,641 |
| A leftover copy of the document properties | 3 of 4,641 |
| An XMP block inside other embedded data (an image or an EPS file) | 2 of 4,641 |
The study found five real gaps in our own tools, and we fixed all five. First, PDFs made in Acrobat by combining or converting files can keep each source document's title, author and creating software in the page structure or in lists attached to the page content. After the Metadata tool alone, 27 files still had such a copy in the page structure and 3 in a content list; Remove Hidden Data cleared the document's own properties and left them, and now removes them too. Second, a calculation or format script on a form field that groups several boxes was not found: 2 files kept one. Third, a form field with no type entry, which the PDF standard requires but some programs leave out, made Remove Hidden Data refuse to open the file at all: 2 files. Fourth, the Metadata tool's photo step could not see inside a photo stored with a second compression layer around the JPEG, so it left that photo's camera data in: 2 files had camera data only in such photos. It now unwraps them, strips them and stores them as a plain JPEG. Fifth, the Metadata tool unlinked the XMP block under the standard Metadata key but not one that a program had hung off a key spelled MetaData with a capital D, or off a structure element, a name tree or an array: 10 files kept one. It now finds a block by what it contains and unlinks it wherever it is held. The Metadata tool edits only the document's own properties, so the first kind remains after it alone, as the second table shows.
What is left after both tools is an XMP block inside an embedded EPS file, in 2 files. Neither tool opens an embedded file, so neither touches the block. A limit of the check: it looks for the items listed above, so a name or a path written on the page itself, or in a picture, would not be found. See checking a PDF before you send it for what each tool leaves, and how we test for the method.
What this does not show
- It is documents published by US federal agencies in 2009. Other sources, other years and other kinds of PDF can look quite different.
- These are files their owners chose to publish on the web. Files shared privately may carry more.
- A field being filled in does not mean it names a person. The study counts fields, not people, and says nothing about the risk to anyone.
- Programs have changed. The share of files made by each family of software in 2009 is not today's.
- Password-protected files were not read, and the percentages leave them out.
Repeat it
The sample rule, the SHA-256 checksum of each zip and every count are in the data file that goes with this study. The files are in the Digital Corpora archive under corpora/files/govdocs1/zipfiles, numbered 000 to 999. Take the same 20 zips, keep the files that start with %PDF-, and count the same things. For your own PDFs the quickest check is the Metadata tool, and the older guide on what PDF metadata reveals explains what each field means.
Everything on HerePDF runs in your browser. Your files are not uploaded, before or after you use these tools.
Frequently asked questions
Where do the files come from?
From GovDocs1, a public research collection of about a million US government web documents gathered in 2009. The study uses 20 of its 1,000 numbered zip files, picked by a fixed rule (every 50th) before any result was seen. HerePDF does not keep, host or upload any of the files.
Does this tell me what is in my own PDFs?
Not directly. It describes a sample of US government documents from 2009. Software has changed since, and a document made today with current Word, Acrobat or a phone may carry more, less or different data. The way to know is to look at your own file, which the Metadata tool does in your browser without uploading it.
Did you read the authors' names?
The analysis reads a field only to decide a yes or no, such as whether an Author exists or a field holds a file path. No name, path or file name was kept, and nothing of the kind is published here or in the data file.
Can I repeat the study?
The sample rule, the checksum of every zip and every count are in the data file, and the method is described on this page. Fetch the same 20 zips from the Digital Corpora archive and count the same things. At the time of writing we do not publish our own scripts, so the tool-test figures can only be repeated by running the tools themselves.
What should I do before sending a PDF to someone?
Look at what it carries and clear what you do not want to share. The Metadata tool shows and clears the document properties, the XMP block and photo data. Remove Hidden Data lists and removes attachments, scripts, comments and more. Both run in your browser, and neither is a full sanitiser: the checklist guide says what they leave.