Click to See Complete Forum and Search --> : Using PHP to edit PDF


danlohye
06-26-2006, 09:06 AM
Hi,

How do I use php to edit a pdf file? Specifically, I would like to upload a pdf file, find a specified string of text (e.g. Google) and replace it with another string (e.g. Yahoo). Then, print a link to download the new pdf.

Thus from file1.pdf:
=======
A good search engine would be Google.
=======

file2.pdf is created:
=======
A good search engine would be Yahoo.
=======

Furthermore, is it also possible to do this and change the hyperlink as well?

Thanks,
Daniel

P.S. I would prefer not to use the PDF library. PDF classes would be good, such as FPDF (http://www.fpdf.org/) or R&OS PDF (http://www.ros.co.nz/pdf/)

dc2000
06-26-2006, 03:25 PM
What's wrong with PDFlib library? Here are some samples for it as well: http://us2.php.net/manual/en/ref.pdf.php

nolawi
06-27-2006, 01:46 PM
use FPDF (http://www.fpdf.org/)

kinni123
03-12-2009, 02:48 AM
Hi...
I have a same problem..
Please any one help me ?

Mindzai
03-12-2009, 04:04 AM
How about either of the two answers posted right above?

spaciane
05-20-2010, 04:37 PM
As far as I've seen, FPDF can ONLY create a pdf file from scratch. Not modify a existing pdf file.