Chapter 28. Printable Document Generation

Although PHP has many uses both from the terminal through the command-line interface as well as from the Web, its primary purpose is as a dynamic document-generation language. In most cases, PHP is used to generate markup languages such as HTML or XML; however, this chapter focuses on the other types of documents that can be generated using PHP—namely Rich Text Format (RTF) and Portable Document Format (PDF) documents.

The first question that must be asked is simple: Why would you want to generate these types of documents? In a Web environment, HTML combined with technologies such as cascading style sheets ...

Get PHP 5 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.