-
-
Save Rourke101/cc98a0dc37780710dc893de6c5c67858 to your computer and use it in GitHub Desktop.
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.
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 | |
| FILE=example.pdf | |
| # read tags from the original PDF | |
| #exiftool -all:all $FILE | |
| # remove tags (XMP + metadata) from the PDF | |
| exiftool -all:all= $FILE | |
| # linearize the file to remove orphan data | |
| qpdf --linearize $FILE | |
| # read XMP from the modified PDF | |
| #exiftool -all:all $FILE | |
| # read all strings from the modified PDF | |
| #cat $FILE | strings > $FILE.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment