[thelist] Solution for PHP modifying PDF?

Pringle, Ron RPringle at aurora-il.org
Fri Feb 9 13:44:42 CST 2007


It looks like this tool might be what you're looking for [0], though it doesn't look serverside?

Otherwise it appears you could use Fpdi [1] to feed a current document in as a template and use one of the free fpdf scripts [2] to add the watermark. Additionally, there is this tool for concatenating pages [3].

I've not done any work with any of these tools, so I could be entirely wrong.

[0] http://www.accesspdf.com/pdftk/

[1] http://www.fpdf.org/en/FAQ.php#17

[2] http://www.fpdf.org/en/script/script9.php

[3] http://thierry.schmit.free.fr/dev/mbtPdfAsm/enMbtPdfAsm2.html


-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org]On Behalf Of Max Schwanekamp
Sent: Friday, February 09, 2007 1:17 PM
To: thelist at lists.evolt.org
Subject: [thelist] Solution for PHP modifying PDF?

I'm look for a server-side solution to modify existing pdf documents 
on-the-fly via my php app.  Right now we use fpdf[0] to generate new pdf 
docs (works great and it's free), but fpdf does not allow modifying 
existing docs.  Fpdi[1] seems to be what I'm after, but so far it seems 
to be aimed more at using a page of an existing pdf doc as a template.  
What I want is to apply a watermark/custom footer to every page of a pdf 
doc, and be able to set the pdf security/options settings.


The solution criteria are:
* Able to run server-side via php.  It could be a command line script 
that runs via a system() command if need be, but an actual php API would 
* Must be able to programmatically apply a custom footer and/or 
watermark to every page of an existing pdf document.
* Must be able to set the "rights" options, esp the "modify","print" and 
"annot-forms" options.
* It would be nice if it would allow prepending the document with a new 
page, but that's not necessary.


Max Schwanekamp

More information about the thelist mailing list