13.09.2016 Views

PHP and MySQL Web Development 4th Ed-tqw-_darksiderg

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Solution Overview<br />

785<br />

Here is a simple RTF document:<br />

{\rtf1<br />

{\fonttbl {\f0 Arial;}{\f1 Times New Roman;}}<br />

\f0\fs28 Heading\par<br />

\f1\fs20 This is an rtf document.\par<br />

}<br />

This document sets up a font table with two fonts: Arial, to be referred to as f0, <strong>and</strong><br />

Times New Roman, to be referred to as f1. It then writes Heading using f0 (Arial) in<br />

size 28 (14 point).The control \par indicates a paragraph break. It then writes This is<br />

an rtf document using f1 (Times New Roman) at size 20 (10 point).<br />

You could generate a document like this manually, but no labor-saving functions are<br />

built into <strong>PHP</strong> to make the hard parts, such as incorporating graphics, easier. Fortunately,<br />

in many documents, the structure, style, <strong>and</strong> much of the text are static, <strong>and</strong> only small<br />

parts change from person to person. A more efficient way to generate a document is to<br />

use a template.<br />

You can build a complex document, such as the one shown in Figure 32.4, easily<br />

using a word processor.<br />

Figure 32.4<br />

Using a word processor, you can create a complex, attractive<br />

template easily.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!