Sunday, March 21, 2010

Import PDF file into PHP script and superimpose text

The last post neglected to mention that the license to remove the PDF watermark costs over $500 (for PDFLib). I thought that since all the "native" php functions for php were activated the license would be free, or at least below $100. NOT.

So I switched to what turns out to be a three pronged solution using free libraries:

FPDF - from fpdf.org
FPDI - from setasign.de
FPDF_TPL - from setasign.de

Recipe:
1. FPDF Put fpdf.php into script folder. Put the font folder in there too.
2. FPDI Put entire contents of FPDI download (including fpdi.php) in the same folder.
3. FPDF_TPL Put fpdf_tlp.php into the same folder.

Now the sample scripts that come with FPDI and FPDF work!!

No comments:

Post a Comment