Why the Web Service?
There are many ways to work with PDFs, including
- Creating PDF documents from scratch (see Print, TCPDF, dompdf, etc.)
- Stamping PDFs with images or data (imaging laying a transparency on top of a document, see PDF Stamper)
- Populating an existing PDF template's form-fields with data, leaving it editable (imagine penciling in a form -- the user can erase data, which is fine sometimes. See Justin Koivisto's example)
- And finally, populating a PDF with form data, and flattening it (imagine using a pen instead of a pencil).
(see more examples of PDF use-cases here)
As it turns out, the PHP libraries out there can do everything except #4: securely populate PDF templates with data :) This includes form-field parsing and XFDF-to-PDF merging and flattening, both which are necessary for FillPDF to work. I'd love to move away from services and get the PDF functionality into PHP, but I've been grinding my gears on that for way too long, and decided to just bite the bullet on iText (Java). I even tried pdftk using PHP's exec(), and Java/PHP bridge -- any one of these in order to get iText working on typical shared hosting, and none of them worked! I'm hoping that if I get any funding from this iText service, I can work it into making this module more PHP-centric (even if it requires a complicated Java/PHP bridge solution) so that no hosting is necessary.
Of interest, there is an effort to port iText to PHP. If you're interested, you might consider contacting Pancho Sünderhauf. Maybe a donation could stimulate his progress. In any case, I'll be keeping an eye on his progress; you can find his thread and contact info at http://itext-general.2136553.n4.nabble.com/PHP-port-in-the-works-td21544....
