# How to clean metadata from a PDF

Originally published at https://gifi.ai/guides/pdf-document-metadata.

A PDF keeps an info dictionary and often an XMP packet: author, creator software, dates, and sometimes a C2PA Content Credential. Deleting those keys in place is not enough — leftover objects stay in the bytes. Gifi clears the fields and rebuilds the file so the old metadata is not sitting in an unused stream.

Reviewed by [Can Balkaya](https://gifi.ai/authors/can-balkaya). Published 2026-08-17; updated 2026-08-17.

## How to verify the job

1. **Inspect.** Preview the document info, XMP, and credential markers before the file leaves your browser.
2. **Rebuild.** The worker clears the metadata and rewrites the PDF structure so unused objects are not left behind.
3. **Reinspect.** Open or scan the returned PDF and compare its action list with the original findings.

## Where a PDF hides its history

The document info dictionary is the obvious place: Title, Author, Creator, Producer, CreationDate, ModDate. Many files also carry an XMP stream attached to the catalogue, which repeats the same facts in XML and can hold a C2PA manifest.

PDFs are a pile of objects with a trailer. If you only rewrite the dictionary and leave the old object in the file, a determined reader can still recover it. That is why a serious strip has to rebuild the structure, not just edit a field.

## Why this job leaves the browser

PNG, JPEG, WebP, SVG, HTML, Markdown, DOCX and ODT can be cleaned in-process. A trustworthy PDF strip needs a tool that can linearize and drop unused objects. Gifi sends PDFs to a worker that can do that. One credit, same as any other file.

A format we cannot fully clean is refused. A PDF you believe is clean, but is not, is worse than one we declined.

## What this does not do

It does not rewrite the sentences on the page. Invisible Unicode in the text layer of a PDF is a different problem from the info dictionary. It does not remove a watermark printed into the appearance of the page. And if a C2PA soft-binding fingerprint was taken, a remote manifest can still re-attach.

## Questions

### Is the title removed?

Document info and XMP are cleared. If you need a title to remain, say so in the download name — do not rely on the PDF’s Author or Title fields after a strip.

### Can I recover the old metadata after a clean?

Not from the cleaned file, if the rebuild finished. That is the point of the structural pass. We cannot speak to copies you still have, or to a remote C2PA registry.

### Does this affect the look of the pages?

The strip targets metadata and unused objects, not the drawing of the page. If a job would have to guess, it fails and the credit is refunded.

## Primary sources

- [Adobe PDF reference](https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf)
