Here's something you may want to check out..

http://www.cs.berkeley.edu/~phelps/Multivalent/index.html

http://www.cs.berkeley.edu/~phelps/Multivalent/Tools/pdf/Uncompress.html

These tools are written in Java and require JRE 1.4.1
I haven't tried any of them yet, but should be easy to implement with system calls or possibly Inline::Java

From the documentation:

Uncompress for Hand Editing or Examination

The written file leaves content streams uncompressed and available for inspection or hand editing. With reference to Adobe's PDF Reference, available online, you can arbitrarily change the PDF, anything from correcting bad OCR, to fixing typos on pages without having the generating application (text is not reflowed), to adding title and keywords, to authoring annotations to diagnosing problems.

Uncompressed content streams are pretty printed to better show structure and objects are labelled with the page numbers they're used on. For Western languages, it is straightforward to identify the character strings and edit them. One must be careful to edit with a text editor, such as Emacs, that can handle binary data and does not translate unfamiliar characters or line endings.

The edited file written by the text editor should be passed through the Compress tool to recompress the streams and rebuild the cross-reference table.

Hopefully someone will find these useful


In reply to Re: Replacing text in a PDF file by Anonymous Monk
in thread Replacing text in a PDF file by Basilides

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.