Skip to content

RootAccessHacker/ghost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ghost

logo

Ghost writes a copy of a PDF with metadata values removed.

The default output path is the original filename with _SANITIZED appended before the .pdf extension.

Metadata fields

Ghost removes values for the following common metadata fields:

  • /Author
  • /Producer
  • /Title
  • /Subject
  • /Creator
  • /Keywords
  • /CreationDate
  • /ModDate
  • /Trapped
  • /PTEX.Fullbanner

Any other metadata keys found in the PDF are also blanked in the sanitized copy.

Requirements

This project was written for Python 3.12 and uses PyPDF2.

Install dependencies with:

python3 -m pip install -r requirements.txt

Usage

python3 ghost.py path/to/file.pdf

Choose an explicit output path:

python3 ghost.py path/to/file.pdf --output path/to/clean.pdf

Print metadata before sanitizing:

python3 ghost.py path/to/file.pdf --verbose

Ghost will not overwrite an existing output file unless --overwrite is supplied.

About

A metatadata sanitization tool for PDF files

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages