-
Install the
pdftk
for the PDF stream, andbbe
to do binary replacement (sed
for binaries).brew install pdftk-java bbe
-
Decompress the PDF.
pdftk infile.pdf output uncompressed.pdf uncompress
-
Remove the watermark.
bbe -e 's/(WATERMARK)Tm//' uncompressed.pdf > clean.pdf
-
Compress the PDF.
pdftk clean.pdf output outfile.pdf compress
Last active
March 28, 2024 16:20
-
-
Save y3nr1ng/9a24b2f59509c52bd59d5c145158328b to your computer and use it in GitHub Desktop.
Remove text-based PDF watermark
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment