I've read PDF Editing in PHP? but haven't found quite what I'm looking for.
Basically I need to take a DOC (read: not .docx) file, which will be used as a template, find certain strings (e.g, [Patient Number], [Site Number], etc) replace them with values that I'll retrieve from a database and then save that file as a .pdf file.
Here's the important points
- I'd rather avoid zend framework (or any framework) for the purpose of keeping my application's software light and not having to maintain another 3rd party piece of code in this project (jquery,jquery-UI,jqGrid, etc)
- I can't use DOCX because I don't have that version of Office installed on my work computer. I will eventually, but I don't know when that'll happen and I need to finish coding this ASAP
- The converting to PDF at the end is somewhat optional. I'd like to have it as interoperable as possible. I already have ezPdf and fPdf on the system, so perhaps I can just feed the generated Word binary into ezPdf/fPdf and generate the PDF that way.
Are there any PHP libraries out there that allow reading a .doc file and then the ability to edit the text and then write it back to the disk?
I've tried ezPdf and fPdf, but the specifying of text block coordinates got too tedious and involved too much guesswork and trial & error.
Thanks in advanced!