Skip to content

Reduces the risk of untrusted PDF documents by reducing them to only printable elements

License

Notifications You must be signed in to change notification settings

PeterReid/pdf_neutralize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This utility is designed to remove anything except visible elements of a PDF, neutralizing anything potentially harmful. It is intended to be run against untrusted PDFs to remove some potential danger.

The untrusted PDF is fed into via stdin. The resulting PDF is outputted via stdout if successful. If an error occurrs, something will be printed to stderr.

Internally, it uses GhostScript, sandboxed in a WASM runtime, to convert the PDF to Postscript format and then back to PDF.

Usage:

npm install -g pdf_neutralize
pdf_neutralize < untrusted.pdf > neutralized.pdf

About

Reduces the risk of untrusted PDF documents by reducing them to only printable elements

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published