-
-
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 XMP from the original PDF | |
| #rm $FILE.before.xmp | |
| #exiftool -tagsfromfile $FILE $FILE.before.xmp | |
| #cat $FILE.before.xmp | |
| # remove XMP from the PDF | |
| exiftool -all:all= $FILE | |
| # read XMP from the modified PDF | |
| #rm $FILE.after.xmp | |
| #exiftool -tagsfromfile $FILE $FILE.after.xmp | |
| #cat $FILE.after.xmp | |
| # read all strings from the modified PDF | |
| #cat example.pdf | strings > $FILE.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment