Jonathan Maron - 2009-10-09 04:20:00 - In reply to message 1 from Keith Hall
Generating print-ready well-formatted PDF documents with PHP is not an easy task. Traditionally, there are two main approaches. Given sufficient time and nerves, both partially get the job done, but still leave a lot to be desired.
The HTML-to-PDF approach is widely used in mainstream applications. Here an HTML document is programmatically created and converted to a PDF, using one of the many open source libraries. Since HTML, however, is not a page-oriented format (as is PDF), it is impossible to perform a 1-to-1 mapping between HTML and PDF. Typical word processing file format features, such as header and footers, orphans and widows or even page numbers can simply not be represented in HTML.
The programmatic approach offers total control of the resulting PDF. However, it requires that the x and y coordinates of every line of text, every geometrical shape and graphic be set from program code, such as Zend_PDF. Not only is this an extremely time-consuming solution, but is also very brittle: Every time a graphical designer changes the layout of a document, a programmer must re-work his or her program code.
I am very happy to read that you enjoy using the new template approach.
Currently, Zend Framework is at version 1.9.3PL1. Zend_Service_LiveDocx_* will be in the next version, which is 1.10. Please see the comments from the Zend Framework project leader Matthew Weier O'Phinney.