How can I edit the text of a PDF file without having the source file of it?

Hamish Carpenter Hamish.Carpenter at its.monash.edu.au
Mon Jun 23 00:21:52 BST 2008


Sridhar Dhanapalan wrote:
> On Sat, 21 Jun 2008 at 15:40, "Peter Williams" <pewtas at gmail.com> wrote:
>> Hello Ubuntu-Australia ppl,
>>
>> { I apologize for waffling on (below) however I figured that I was best for
>> me to supply too much info rather than not enough. }
>>
>> I have a PDF file (eg an Adobe Portable Document Format) file which I
>> authored quite a long time ago... back when I was using M$ Windows XP Home
>> Edition as my Operating System. I now wish to edit the PDF file, however I
>> don't know where the source document is, or whether I even HAVE the source
>> file. From memory, the file was written using Micro$oft Word, and probably
>> printed with PDF995 (M$ Windows print driver which creates PDF documents).
>> [ eg PDF995 is available from the website www.pdf995.com ]
> 
> PDF is primarily an export format - it was never designed to be edited. 
> However, there are some tools out there which can do it - pdfedit and the 
> soon-to-be-released OpenOffice.org 3.0 spring to mind.

It is possible to treat a PDF like a canvas and draw a white box with new text over the old text. This is usually done programmatically and can take a lot of fiddling.

It would also be possible to splice the original PDF with a new page replacing the one with the old url. This is probably the easiest approach. PDF::Reuse [1] will do this for you in perl but its API is reasonably complicated, there may also be GUI tools for this including PDF Split and Merge [2]. Extract pages 1 to 4 and 6 to 16. Create a new page 5, merge back together.

[1] http://search.cpan.org/~nsharrock/PDF-Extract-3.02/lib/PDF/Extract.pm

[2] Open source, java: http://www.pdfsam.org/?page_id=10



More information about the ubuntu-au mailing list