How to find and replace text in a existing PDF file with PDFTK (or other command line application)
I have on each page of my PDF document a line with this string: %REPLACE% Which I'd like to find and replace with another string. Does anyone know how to do this with some command line application such as PDFTK? This folk gave me an important clue however I'd like something more direct. Thanks. Dingo You can try to modify content of your PDF as follows Uncompress the text streams of PDF pdftk file.pdf output uncompressed.pdf uncompress Use sed to replace your text with another sed -e "s/ORIGINALSTRING/NEWSTRING/g" <uncompressed.pdf >modified.pdf If this attempt was successful, re-compress the