The requirement arose for a good way to output a .pdf file in PHP.
For those programmers out there, I have no doubt you have tried many different libraries for achieving this purpose, e.g. fpdf, Zend_Pdf, etc. We’ve used them too!
This next method is by no means a complete replacement for creating .pdf files through PHP… but it is a nice way to do a mail merge across a document, preserving formatting and structure. I’m talking about LiveDocx.
If you haven’t used this before, you may be in for a treat. It was as simple as creating a word document (as a .doc or .docx, among other formats), then with some very simple PHP code, the output was returned quickly and easily. It uses the Zend Framework, which we personally love.
The service even allows for repeating of content within the document, using “blocks” (which are really just bookmarks). This allows you to create, for example, line items in an invoice… cool, eh?
Not sure if this is for you? Well the LiveDocx service has a free option as well, so jump in and give it a try.
Well done to the LiveDocx development team!
Credits to the Zend Framework development team… they made it easy for us too!