|P is for Practical|
Re: Editing/Replacing Text in a PDFby Russ (Deacon)
|on Dec 20, 2006 at 18:20 UTC||Need Help??|
PDFs are relatively simple beasts, but what you're trying to do is corrupting the xref tables, which hold byte offsets to the beginnings of PDF objects. I haven't seen the output of Indesign, but the fact that you are able to replace text directly suggests that Indesign does not compress all its objects. That's good for your purposes.
You'll want the PDF Reference (published by Adobe) to understand this better, but look at the xref table in the output file. It looks like this:
You'll want to know which objects you are modifying so you can correct all the objects with higher offset values. An object starts with a section like this:
This is the 71st object (note that the xref table I copied started its numbering at 69, for some reason), 0th revision. It starts after 616 bytes, which you can see in the xref table above.
At a minimum, if all else goes well, you will have to correct the byte offstes of the objects that appear after your changes, so that the viewer can "find" them.
If you're looking for an easy fix, this won't help. If you're willing to invest some time learning a really cool file format, jump on in!
P.S. (Pun kinda intended) There may be more than one xref table. For your purposes, update all of them with offsets greater than your byte location until you know why you don't have to... :-)