Skip to content

sdcirri/pdf-sanitizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python

pdf-sanitizer

Get rid of unwanted JavaScript and attachments in a PDF file

Dependencies

PyPDF 4.x

How to run

  1. Install PyPDF
$ pip install -r requirements.txt
  1. Run
$ python main.py inputfile.pdf outputfile.pdf

How it works?

It rebuilds the PDF from scratch, discarding any JavaScript embedded in actions and in the document root. Attachments are restored only if the user requests that when prompted.

About

Get rid of unwanted JavaScript and attachments in a PDF file

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages