PDF Metadata: How to View and Remove Hidden Data in 2027
PDF metadata includes hidden information like author name, creation date, software used, and editing history. To view: use Adobe Acrobat (Properties), or command-line `pdfinfo`. To remove: use Adobe Acrobat (Sanitize), ExifTool, or qpdf. Metadata ...
PDF Metadata: How to View and Remove Hidden Data in 2027
Quick answer: PDF metadata includes hidden information like author name, creation date, software used, and editing history. To view: use Adobe Acrobat (Properties), or command-line pdfinfo. To remove: use Adobe Acrobat (Sanitize), ExifTool, or qpdf. Metadata can leak sensitive information (author identity, internal file paths, software versions). Always sanitize PDFs before sharing externally. For batch processing, use ExifTool or Python (PyPDF2).[1][3][4]
PDF metadata is hidden information embedded in PDF files that most users never see. In 2027, with increasing privacy concerns and data protection regulations, managing PDF metadata is a critical security practice.
What is PDF metadata?
Types of metadata
1. Document information dictionary (traditional)
- Title
- Author
- Subject
- Keywords
- Creator (software that created the PDF)
- Producer (software that converted to PDF)
- Creation date
- Modification date
2. XMP metadata (modern)
- Extensible Metadata Platform (Adobe standard)
- More structured and extensible
- Can include: copyright, rights, description
- Supports custom metadata fields
- Used by search engines and DAM systems
3. Embedded file metadata
- Metadata from embedded files (images, attachments)
- EXIF data from photos
- Document properties from source files (Word, Excel)
4. Hidden data
- Comments and annotations
- Form field data
- JavaScript
- Embedded files
- Revision history (in some PDFs)
- Layer information[3]
Why metadata matters
Privacy risks
- Author identity: Real name of document creator
- Company info: Internal file paths, server names
- Software versions: Vulnerability information
- Location data: GPS coordinates in embedded photos
- Editing history: Previous versions, tracked changes
- Confidential info: Internal comments, annotations
Real-world examples
- A government document leaked the author's name and internal file path
- A company's PDF revealed their internal server structure
- A photo in a PDF contained GPS coordinates of a classified location
- A legal document showed tracked changes revealing negotiation strategy[3][4]
Viewing PDF metadata
Adobe Acrobat
- Open PDF in Acrobat
- File → Properties (Ctrl+D)
- View tabs: Description, Security, Fonts, Advanced
- XMP metadata: Tools → Protect → Remove Hidden Information
Command line (pdfinfo — Poppler)
# View basic metadata
pdfinfo input.pdf
# Output:
# Title: Quarterly Report
# Author: John Smith
# Creator: Microsoft Word
# Producer: Adobe PDF Library
# CreationDate: Mon Jan 15 10:30:00 2027
# ModDate: Mon Jan 15 14:22:00 2027
# Pages: 24
# Page size: 612 x 792 pts (Letter)
# PDF version: 1.7Command line (ExifTool)
# View all metadata
exiftool input.pdf
# View specific fields
exiftool -Author -Creator -CreateDate input.pdf
# View XMP metadata
exiftool -XMP:All input.pdfPython (PyPDF2/pypdf)
from pypdf import PdfReader
reader = PdfReader("input.pdf")
info = reader.metadata
print(f"Title: {info.title}")
print(f"Author: {info.author}")
print(f"Creator: {info.creator}")
print(f"Producer: {info.producer}")
print(f"Created: {info.creation_date}")
print(f"Modified: {info.modification_date}")Online tools
- PDF.ai: View metadata
- Smallpdf: PDF info viewer
- ILovePDF: PDF metadata viewer[3]
Removing PDF metadata
Adobe Acrobat (Sanitize)
- Open PDF in Acrobat Pro
- Tools → Redact → Sanitize Document
- Select what to remove:
- Metadata
- Comments and annotations
- Form fields
- Hidden layers
- Embedded files
- JavaScript
- Click "Sanitize" → Save
ExifTool (command line)
# Remove all metadata
exiftool -all= input.pdf
# Remove specific fields
exiftool -Author= -Creator= -Title= input.pdf
# Remove XMP metadata
exiftool -XMP:All= input.pdf
# Batch remove from multiple PDFs
exiftool -all= *.pdfqpdf (command line)
# qpdf doesn't directly remove metadata
# But can create clean copy
qpdf --linearize input.pdf output.pdf
# For full sanitization, use ExifTool after qpdfPython (pypdf)
from pypdf import PdfReader, PdfWriter
reader = PdfReader("input.pdf")
writer = PdfWriter()
for page in reader.pages:
writer.add_page(page)
# Don't copy metadata (creates clean document)
# Or explicitly clear metadata
writer.add_metadata({})
with open("clean.pdf", "wb") as f:
writer.write(f)Mac Preview
- Open PDF in Preview
- File → Export as PDF
- This creates a new PDF with minimal metadata
Note: Mac Preview doesn't fully sanitize. Use ExifTool for thorough removal.
Batch metadata removal
Remove from all PDFs in folder
# ExifTool (recommended)
exiftool -all= -overwrite_original *.pdf
# Python batch
import glob, os
from pypdf import PdfReader, PdfWriter
for filepath in glob.glob("*.pdf"):
reader = PdfReader(filepath)
writer = PdfWriter()
for page in reader.pages:
writer.add_page(page)
writer.add_metadata({})
output = f"clean_{os.path.basename(filepath)}"
with open(output, "wb") as f:
writer.write(f)
print(f"Cleaned: {filepath}")Hidden data beyond metadata
Comments and annotations
- Sticky notes, highlights, underlines
- Text comments, stamps
- Drawing annotations
- Remove: Adobe Acrobat → Comments → Delete All
Form fields
- Filled form data
- Hidden form fields
- JavaScript in form fields
- Remove: Adobe Acrobat → Prepare Form → Delete fields
Layers
- Hidden layers (may contain sensitive content)
- Optional content groups
- Remove: Adobe Acrobat → Layers panel → Delete
Embedded files
- Attached files (may contain sensitive data)
- Embedded fonts (can reveal software)
- Remove: Adobe Acrobat → Attachments → Delete
JavaScript
- Document-level scripts
- Page-level scripts
- Form field scripts
- Remove: Adobe Acrobat → JavaScript → Remove
Revision history
- Some PDFs contain previous versions
- Incremental updates may be recoverable
- Remove: Create new PDF from scratch (print to PDF or re-export)[3][4]
Metadata and compliance
GDPR
- PDFs may contain personal data in metadata
- Must be sanitized before sharing
- Right to erasure applies to metadata
HIPAA
- Medical PDFs must not contain patient identifiers in metadata
- Sanitize before sharing or archiving
Legal discovery
- Metadata is discoverable in litigation
- Can reveal document history, authorship
- Sanitize before production (if not relevant)
Corporate policy
- Most organizations have PDF sanitization policies
- Implement automated sanitization in document workflows
- Train employees on metadata risks[3][4]
Frequently Asked Questions (FAQ)
What is PDF metadata?
PDF metadata is hidden information embedded in PDF files, including author name, creation date, software used, title, subject, and keywords. It's stored in the document information dictionary and/or XMP metadata.[3]
How do I view PDF metadata?
Use Adobe Acrobat (File → Properties), command-line pdfinfo (Poppler), ExifTool, or Python (pypdf). Online tools like Smallpdf also show basic metadata.[3]
How do I remove PDF metadata?
Use Adobe Acrobat (Sanitize Document), ExifTool (exiftool -all=), or Python (pypdf with add_metadata({})). For thorough removal, use Adobe Acrobat's Sanitize feature which also removes comments, form data, and hidden layers.[3]
Can metadata be recovered after removal?
If you use proper sanitization (Adobe Acrobat Sanitize, ExifTool), metadata is permanently removed. However, if the PDF was shared before sanitization, recipients may still have the original. Always sanitize before sharing.[3]
Does removing metadata affect the PDF content?
No. Metadata removal doesn't change the visible content (text, images, layout). It only removes hidden information.[3]
What metadata can leak sensitive information?
Author name, creator software, creation/modification dates, internal file paths, GPS coordinates (from embedded photos), and comments/annotations. All should be removed before external sharing.[3][4]
Is there a free way to remove PDF metadata?
Yes. ExifTool (free, open-source), Python (pypdf, free), and online tools (Smallpdf, ILovePDF) can remove metadata. Adobe Acrobat Pro (paid) offers the most thorough sanitization.[3]
How do I automate PDF sanitization?
Use ExifTool in a script: exiftool -all= -overwrite_original *.pdf. Or use Python with pypdf in a batch script. Integrate into your document workflow (CI/CD, document management system).[3][4]
Related reading on MintSaaS
- PDF Security: How to Protect Sensitive Documents Online
- How to Protect PDF with Password: Step-by-Step
- PDF/A Compliance: How to Create Archival PDFs
Sources
[1] Adobe — Sanitize PDF: https://www.adobe.com/acrobat/how-to/sanitize-pdf.html
[2] ExifTool — Documentation: https://exiftool.org/
[3] MintSaaS Image Compressor: https://www.mintsaas.net/products/image-compressor
[4] Web.dev — Core Web Vitals: https://web.dev/vitals/
[5] MintSaaS PDF Compressor: https://www.mintsaas.net/products/pdf-compressor
Free tools on MintSaaS
Try our free tools to put this guide into practice:
MintSaaS Dispatch articles are researched and synthesized with the assistance of artificial intelligence analysis, then edited, verified, and benchmarked by our engineering editorial team. Customer personal data and platform source files are strictly segregated and are never used to train or fine-tune public artificial intelligence models.
More from MintSaaS Dispatch
Handcrafted technical insights and developer tools.