-
-
Save deep-programmer/6469e90f1e222983dbdb49f2ed99faed to your computer and use it in GitHub Desktop.
Remove all annotations from a PDF document
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| pdftk "$1" output uncompressed.pdf uncompress | |
| LANG=C sed -n '/^\/Annots/!p' uncompressed.pdf > stripped.pdf | |
| pdftk stripped.pdf output "$2" compress | |
| # clean | |
| rm uncompressed.pdf stripped.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment