Clean PDF metadata
pdf_clean_metadataStrip PDF metadata—title, author, subject, keywords, dates, and XMP streams—to anonymize documents before sharing. Runs locally; files never leave your machine.
Instructions
Strip document metadata: clears title, author, subject, keywords, creator and the CreationDate/ModDate in the info dictionary, AND deletes the document-level XMP metadata stream (the copy Acrobat/Word/InDesign write). Note: pdf-lib rewrites /Producer with its own signature on save, so that one field is replaced rather than emptied. Runs entirely on this machine — the file is read and written locally and never sent anywhere.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Replace the output file if it already exists (default: refuse, so existing files are never silently clobbered) | |
| input | Yes | Path to the input PDF | |
| output | Yes | Path to write the cleaned PDF |