PDF Metadata: XMP, DocInfo Dictionary, and Controlling What You Share
Every PDF carries metadata — author name, creation date, software used, revision history, and more. Some is visible; much is hidden. This guide explains the two metadata systems in PDF (DocInfo dictionary and XMP), what data is stored, how to read it, and how to strip or control it before sharing.
Every PDF you create carries a hidden passenger: metadata. Author names, organisation names, creation dates, the software used to create the file, revision history, comments, and sometimes file path information — all embedded in the file and readable by anyone who knows where to look. Most users never think about PDF metadata until it causes a problem: a leaked author name in a supposedly anonymous document, a software version that exposes an unpatched vulnerability, or a HIPAA violation triggered by medical notes left in the document's comment fields.
This guide explains the two metadata systems in PDF (the DocInfo dictionary and XMP), what data is stored in each, how to read and inspect metadata, and how to control, strip, or sanitise it before sharing documents.
The two metadata systems: DocInfo and XMP
PDF contains two parallel metadata systems that often contain overlapping information:
**The Document Information Dictionary (DocInfo)**: The original PDF metadata system, introduced in PDF 1.0. A simple key-value dictionary stored as a PDF object with a fixed set of standard keys: /Title, /Author, /Subject, /Keywords, /Creator (the authoring software), /Producer (the PDF generator), /CreationDate, and /ModDate. Simple, widely supported by all PDF readers, and editable through Acrobat's Document Properties dialog.
**XMP (Extensible Metadata Platform)**: Adobe's XML-based metadata standard, introduced in PDF 1.4. XMP is a full XML document embedded in a PDF metadata stream, using Dublin Core and PDF-specific namespaces. XMP can carry all the same fields as DocInfo plus custom properties, IPTC data, rights management information, and any application-specific metadata the creating software chooses to embed. XMP is richer and more extensible than DocInfo.
In a PDF created by modern Adobe software, both systems typically exist and should contain consistent data. In PDFs created by other tools, only one or neither may be present. When the two conflict, readers typically prefer XMP; the PDF specification recommends synchronising them.
What metadata your PDF may contain
Beyond the standard DocInfo and XMP fields, a PDF may carry metadata in many additional locations:
**Creation and modification dates**: Precise timestamps of when the document was created and last modified, often including timezone information that can reveal the author's location.
**Software versions**: The Creator and Producer fields identify the exact software and version used — which can reveal unpatched vulnerabilities in old software versions.
**Author and organisation**: The Author field often contains the user's full name and organisation as configured in their operating system or word processor profile.
**Revision history**: Some authoring tools (notably Microsoft Word, converted via Save As PDF) embed revision or version history that may contain previously deleted content or author identities.
**Document comments and annotations**: Comments left during review — visible in the Comments panel — may contain sensitive content or reviewer identities. These are PDF annotation objects, not the same as metadata, but often forgotten during "cleanup".
**Thumbnail images**: Some PDFs contain embedded page thumbnails, which are raster renderings of page content. If content was removed or redacted after the thumbnail was generated, the thumbnail may contain the original unredacted content.
**Embedded files**: PDF attachments (via the embedded file tree) may contain original source documents with their own metadata, comment history, and tracked changes.
**Custom metadata**: Enterprise document management systems often inject custom XMP metadata — document IDs, classification levels, workflow state — that can reveal internal system information.
How to inspect PDF metadata
Several tools allow metadata inspection:
**Adobe Acrobat Pro**: File > Properties > Description (DocInfo and XMP summary). For full XMP XML, use Document Properties > Additional Metadata > Advanced. The Preflight tool can show detailed metadata reports.
**ExifTool** (free, cross-platform): The most comprehensive metadata extraction tool available. Run exiftool -all file.pdf to dump all metadata in all namespaces. ExifTool can also write and delete metadata fields. Download from exiftool.org.
**pdfinfo** (part of Poppler utilities, free): pdfinfo file.pdf shows DocInfo fields and basic document information. Less comprehensive than ExifTool but useful for quick checks.
**Python with PyMuPDF**: doc.metadata returns a dictionary of DocInfo fields. XMP can be accessed via doc.get_xml_metadata().
**Browser developer tools**: Open a PDF in Chrome, right-click, Inspect — the network tab may show the PDF request, and some metadata is accessible via the browser's PDF viewer properties.
Stripping and sanitising PDF metadata
Approaches for removing or controlling PDF metadata:
**Acrobat Pro — Document Properties**: Manually clear individual DocInfo fields (Title, Author, Subject, Keywords). Does not clear XMP metadata or other data stores automatically.
**Acrobat Pro — Sanitize Document**: The most thorough option. Tools > Redact > Sanitize Document removes all metadata, embedded content, scripts, hidden layers, and other data that is not part of the visible page content. Creates a new PDF. Recommended for any sensitive document before sharing.
**ExifTool**: exiftool -all= file.pdf removes all metadata ExifTool can write. Note: ExifTool operates on the metadata wrapper but cannot remove embedded file attachments or annotation content.
**qpdf with custom transformation**: qpdf can remove specific PDF objects, including the Info dictionary, via --remove-unreferenced-resources combined with custom JSON transformations.
**PDF print-to-PDF**: Printing to a PDF printer (macOS Print > Save as PDF, Chrome Print > Save as PDF) typically creates a new PDF with minimal metadata from the printing context, stripping most source metadata. However, this also strips interactivity and may affect visual fidelity.
For the most sensitive use cases (legal discovery, redaction workflows, HIPAA-sensitive documents), use Acrobat's Sanitize Document or a dedicated document sanitisation service.
Metadata in PDF/A and long-term archiving
PDF/A archiving has specific metadata requirements: a PDF/A document must contain XMP metadata with at least the pdfaid:conformance and pdfaid:part fields that identify the PDF/A conformance level. These fields are required — removing them would break PDF/A conformance.
PDF/A also requires that DocInfo and XMP metadata are synchronised — if both exist, they must contain identical values. Some PDF conversion tools create inconsistencies here, which PDF/A validators (like veraPDF) will flag as a conformance failure.
For archiving workflows: include complete and accurate metadata (title, author, creation date, subject) in both DocInfo and XMP — this data aids future discoverability and access. Strip operational metadata (internal workflow state, software version details) that has no archival value but consumes space or reveals sensitive information.
PDF metadata is invisible to most users but potentially very revealing to anyone who looks for it. A simple ExifTool inspection before sharing a sensitive document takes seconds and can prevent embarrassing or costly metadata exposures. For high-stakes document sharing, Acrobat's Sanitize Document function provides a comprehensive one-step cleanup that covers metadata, annotations, embedded files, and other hidden data.
Combine metadata sanitisation with our redaction tool for complete document sanitisation before sharing sensitive PDFs.
Frequently asked questions
What is the difference between DocInfo and XMP metadata in a PDF?
The DocInfo dictionary is the original PDF metadata system — a simple key-value store with fixed fields (Author, Title, Subject, Keywords, Creator, Producer, CreationDate, ModDate). XMP is an XML-based system embedded in a metadata stream that can carry all the same fields plus custom application-specific properties. Modern PDFs typically have both, synchronised. XMP is richer and more extensible; DocInfo is simpler and more universally supported. When conflicts exist between the two, viewers typically prefer XMP.
Does printing a PDF to a new PDF remove metadata?
Partially. Printing to a PDF (macOS Print > PDF, Chrome Print > Save as PDF, Microsoft Print to PDF) creates a new PDF from the rendered output. This typically strips most source application metadata — the Creator field reflects the PDF printer, not the original software, and revision history is not carried over. However, the process may introduce new metadata (print timestamp, OS username) and does not strip embedded files or annotations unless those are also flattened. For thorough metadata removal, use Acrobat's Sanitize Document.
Can metadata in a PDF identify who created it?
Yes — the Author field often contains the full name of the document creator as configured in the word processor or operating system profile. The Creator field identifies the authoring software (which may include the user's licence name). CreationDate and ModDate can reveal timezone and working hours. ExifTool can also extract GPS metadata if present, or camera model data from embedded images. For anonymous document creation, clear all metadata fields and use a generic software profile.
How do I add meaningful metadata to a PDF for archiving?
In Acrobat Pro, go to File > Document Properties > Description to set Title, Author, Subject, and Keywords for the DocInfo dictionary. For XMP metadata (required for PDF/A), use the Additional Metadata dialog in the same panel. Ensure the Title field contains the full document title (not the filename), the Author reflects the organisation or person responsible (not necessarily the typist), the Subject is a brief abstract, and Keywords include searchable terms. These values improve discoverability in document management systems and search engines that index PDF metadata.
Try it yourself
Everything in this article can be done directly in the free PDFTheGuide editor — no account required.