PDF metadata cleanup is a GroupDocs.Metadata workflow for .NET that strips Author-style Info dictionary and XMP fields from PDFs before they leave a service. Author, Creator, Producer, Keywords, and XMP packets often survive “Save As” and browser downloads. Teams that share contracts need a server-side cleanup step that can prove Author-style identity is gone.
I reached for this pattern after a partner still saw Author = Alice Example on a draft we thought a browser cleaner had already scrubbed.
Two cleanup intensities show up in real pipelines: erase every detected package before a file leaves a trust boundary, or strip only person-tagged fields when Title and Subject must stay. GroupDocs.Metadata for .NET supports both on the same Metadata object.
This guide compares 2 primary cleanup methods for PDF documents using GroupDocs.Metadata for .NET, plus inspect and verify steps. Each method is evaluated on complexity, suitability, and maintenance.
What This Guide Covers
You will see when to call Sanitize() for a full wipe, when to call RemoveProperties for Author-style fields only, how to baseline with FindProperties, and how to verify Author / Person.Creator after Save.
Prerequisites:
.NET 8 SDK and NuGet access to GroupDocs.Metadata 26.8.0
A PDF that still carries Info dictionary and/or XMP identity fields
Note
Complete Source Code: All examples are available in our GitHub repository. Clone, run, and customize for your needs.
Quick Decision Matrix
Scenario
Recommended Method
Why
File leaves the company / partner share
Sanitize all metadata
Clears Info and XMP packages in one call
Archive search still needs Title/Subject
Remove author metadata
Keeps descriptive fields, drops person identity
You do not know what the PDF carries
Inspect first
FindProperties prints the before baseline
Compliance asks “is Author gone?”
Verify after save
Re-open and check Author / Person.Creator
Browser cleaner already ran once
Prefer API Sanitize
GUI tools often miss XMP packets
Method Comparison Overview
Method
Complexity
Performance
Flexibility
Best For
Sanitize all metadata
Low
Fast single pass
Low (all-or-nothing)
Outbound / untrusted exit
Remove author metadata
Medium
Fast filtered pass
High (predicate)
Keep Title/Subject, drop people
Inspect metadata
Low
Read-only
High (filters)
Before/after diagnostics
Verify author removed
Low
Read-only
Focused
Audit after Save
Detailed Method Analysis
Method 1: Sanitize all PDF metadata
Overview: Calls Sanitize() on a loaded PDF to clear recognized metadata packages, including Info dictionary fields and XMP, then saves a new file. Use when no authorship trail should remain.
How It Works
Open the PDF with Metadata, call Sanitize(), print the removed-property count, and Save to an output path. The call targets detected packages rather than asking you to list every field name by hand. It is the blunt instrument for outbound hygiene.
When to Use
вњ… Partner or public download links
вњ… Cross-tenant document exchange
вњ… “Leave no Author trail” policy exits
Pros and Cons
Pros:
One call covers Info and XMP packages the API detects
Small code surface; easy to wrap in a service method
Returns a removal count you can log
Cons:
Removes descriptive fields you may still need for filing
After Save, Tool.Software Creator/Producer may be rewritten by the PDF engine
For single-page contract PDFs the pass is dominated by open/save I/O. Log removed so operators can spot empty cleans versus large wipes.
Method 2: Remove author-style PDF properties
Overview: Uses RemoveProperties with person/creator tags and Author/Creator/Producer name checks so identity is stripped while Title, Subject, and Keywords can remain.
How It Works
Build a predicate that matches Tags.Person.Creator, Tags.Person.Editor, and common identity property names. RemoveProperties deletes matches only. Save the result, then inspect again to confirm descriptive fields survived.
When to Use
вњ… Records systems that index Title/Subject
вњ… Redacting people from circulating drafts
вњ… Policies that ban Author but allow keywords
Pros and Cons
Pros:
Selective: keeps filing metadata that search depends on
Predicate is explicit and reviewable in code review
Same Metadata API as Sanitize
Cons:
You must maintain the predicate as new identity fields appear
Creator/Producer name matches can overlap tool fingerprints after Save
Overview: Re-opens the cleaned PDF and prints True when Author / Person.Creator / Person.Editor leftovers are absent. Ignore Tool.Software Creator/Producer fingerprints rewritten on Save.
When to Use
вњ… CI assertion after cleanup
вњ… Distinguishing Author removal from engine stamps
Challenge: Legal shares a draft PDF that still shows Author = Alice Example and Keywords marked confidential.
Solution: Run inspect, then Sanitize(), then verify Author is gone before uploading to the partner portal.
Result: Removal count is logged (for example 7), and verify prints True for Author-style leftovers.
Internal archive with search fields
Challenge: Records still need Title and Subject, but person names must not travel in Author.
Solution:RemovePdfAuthorMetadata with the person/creator predicate, then inspect to confirm Title/Subject/Keywords remain.
Result: Author-style fields drop (for example 3 removals) while descriptive fields stay searchable.
Why do Creator and Producer still appear after a successful clean?
Re-open the cleaned PDF and look only for Author / Person.Creator / Person.Editor. Residual Creator or Producer values tagged as Tool.Software are often PDF-engine fingerprints written on Save, not the original author identity. Treat those stamps as expected noise. Score the cleanup as failed only when Author-style leftovers remain. That distinction keeps CI checks honest and matches what compliance reviewers actually ask after a metadata wipe on GroupDocs.Metadata for .NET.
FAQ
Does Sanitize remove XMP as well as the Info dictionary?
Sanitize() clears recognized metadata packages detected on the PDF, including Info dictionary fields and XMP when present. Always inspect before and after on your own files.
Can I keep Keywords while removing Author?
Yes. Use RemoveProperties with a person/creator-focused predicate like the sample.
Which GroupDocs.Metadata version do these samples use?
GroupDocs.Metadata 26.8.0 on .NET 8.
Conclusion
Pick Sanitize when a PDF exits a trust boundary and nothing identity-related should remain. Pick RemoveProperties when Title and Subject must survive. Wrap both with inspect and Author-focused verify so operators can see before/after evidence.
Next steps: clone strip-pdf-metadata-dotnet, run the console app against Resources/contract-with-metadata.pdf, then wire the same methods into your upload service.