I am doing a mass find and replace using sed and pdftk to find and replace a word in PDF files. When I run the following command,
sed -e "s/word1/word2/g" test.pdf
I get the following error,
sed: RE error: illegal byte sequence
I tried running sed with,
LANG=C sed -e "s/word1/word2/g" test.pdf
and it runs but doesn't find and replace the string.
I should mention that I tried uncompressing the PDF using pdftk, running sed, and then recompressing with no results. I am also running this through MAC OS X bash, but I'm thinking the solution should be relatively the same as Linux command line.
Can anyone offer any suggestions for this?