PDF Metadata Editor (2025): edit, sync, clean
A universal guide to editing PDF metadata: GUI apps, CLI tools, and code. Set Title/Author/Keywords, keep Info and XMP in sync, and remove the unnecessary without risking content.
Privacy Risk
Authors, software, dates
Lossless
Metadata-only
Automation
CLI friendly
Info vs XMP
PDF stores metadata in the Info dictionary (Title, Author, Subject, Keywords, Creator, Producer, CreationDate, ModDate) and in XMP (an XML packet). Keep them synchronized for correct results.
Editors: GUI / CLI / Code
Acrobat / macOS Preview / Okular
Quick manual edits
They change basic fields; XMP isnβt always synchronized β verify with CLI.
Edit common fields
# Basic edit and save exiftool -Title="Spec" -Author="Team" -Subject="Release" -Keywords="spec,release" -overwrite_original "doc.pdf"
Remove metadata safely
# Full wipe (content untouched) exiftool -all= -overwrite_original "doc.pdf" # Selective: clear only these exiftool -Title= -Author= -Subject= -Keywords= -Creator= -Producer= -CreateDate= -ModifyDate= "doc.pdf"
Sync Info β XMP
# Copy XMP -> Info exiftool -Title<XMP:Title -Author<XMP:Author -Subject<XMP:Subject -Keywords<XMP:Keywords -overwrite_original "doc.pdf" # Copy Info -> XMP exiftool -XMP:Title<Title -XMP:Author<Author -XMP:Subject<Subject -XMP:Keywords<Keywords -overwrite_original "doc.pdf"
Optimize & linearize
qpdf
Fast web view
qpdf --linearize --object-streams=generate --stream-data=preserve in.pdf out_linear.pdf
Ghostscript
Optional
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.7 -dNOPAUSE -dBATCH -sOutputFile=rebuilt.pdf in.pdf
CI/Batch automation
name: sanitize-pdf
on:
push:
paths: ["docs/**/*.pdf"]
jobs:
clean:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Wipe metadata
run: |
for f in docs/**/*.pdf; do
exiftool -all= -overwrite_original "$f"
done
- name: Verify
run: |
for f in docs/**/*.pdf; do
exiftool -G -a -s "$f" > "${f%.pdf}.meta.txt"
doneRedaction vs metadata
Removing metadata does not remove sensitive text/images from pages. True redaction deletes page objects. Verify by searching/copying text and inspecting objects (mutool show).
FAQ
Ship clean PDFs β keep teams private
Edit and clean PDF metadata safely. For embedded images, scrub EXIF/GPS first.