Luke Welling Partner, Tangled Web Design
Laura Thomson Partner, Tangled Web Design
Common printable document formats in use today include Adobe's Portable Document Format (PDF) and Microsoft Word (DOC or RTF). A dynamic HTML document is easily generated using PHP but for applications such as providing a paper form or generating legal documents, letters, or certificates HTML has important limitations. Generating RTFs and PDFs from PHP is more complicated than generating HTML, but can add significant value to a web site.
Outline:
- The strengths and weaknesses of using alternative document formats
- Technical details of these formats
- How to use PHP's string processing functions to integrate a template with a user's data to create a rich text format (RTF) document.
- How to use a similar approach (but using regular expressions) to generate a Portable Document Format (PDF) document
- How to use PHP's PDFlib functions to generate a PDF document
- Comparison of approaches
|