Edit PDF Code Freely

[Hack #80] revealed the hackable
plain text behind PDF. Here we edit this PDF text and then use pdftk [Hack #79] to cover our
tracks. pdftk can also compress the page streams when
we’re done.

Warning

An unsuitable text editor can quietly damage your PDF. Test your
text editor by simply opening a
PDF, saving it into a new file, and then trying to open this new file
in Acrobat or Reader. If your editor corrupted the
PDF’s data, Acrobat or Reader should display a brief
warning before displaying the PDF. Sometimes, however, this warning
flashes by too quickly to notice. After the PDF is repaired, Acrobat
and Reader will display the PDF as if nothing happened.