Specifications

Solution Components
To get the system working, we will need to be able to examine users knowledge and (assum-
ing that they pass the test) generate a certificate reporting their performance. We will experi-
ment with generating this certificate in three different ways: two using PDF and one using
RTF.
Lets look at the requirements of each of these components in some detail.
Question and Answer System
Providing a flexible system for online assessment that allowed a variety of different question
types, various media types for supporting information, useful feedback on wrong answers, and
clever statistic gathering and reporting, would be a complex task on its own.
In this chapter, we are mainly interested in the challenge of generating customized documents
for delivery over the Web, so we will only build a very simple quiz system.
The quiz does not rely on any special software. It uses an HTML form to ask questions and a
PHP script to process the answers. We have been doing this since Chapter 1, PHP Crash
Course.
Document Generation Software
No additional software is needed on the Web server to generate RTF or PDF documents from
templates, but you will need software to create the templates. In order to use the PHP PDF
creation functions, you will need to have compiled PDF support into PHP. (Well discuss more
about this in a minute.)
Software to Create RTF Template
You can use the word processor of your choice to generate RTF files. We used Microsoft Word
to create our certificate template. The certificate template is included on the CD-ROM in the
Chapter 30 directory.
If you prefer another word processor, it would still be a good idea to test the output in Word as
this is the software that the majority of your visitors will be using.
Software to Create PDF Template
PDF documents are a little more difficult to generate. The easiest way is to purchase Adobe
Acrobat. This software will let you create high-quality PDFs from various applications.
We used Acrobat to create the template file for this project.
Generating Personalized Documents in Portable Document Format (PDF)
C
HAPTER 30
30
GENERATING
PERSONALIZED
DOCUMENTS IN
PDF
749
36 7842 CH30 3/6/01 3:40 PM Page 749