38
785
The Problem
If you present your visitors with an ASCII file,however,you have very little control
over the appearance of their certificates.You cannot control fonts or page breaks.You can
only include text and have very little control over formatting.You have no control over a
recipient’s duplication or modification of the document.This is the method that makes it
easiest for the recipient to fraudulently alter her certificate.
HTML
An obvious choice for delivering a document on the Web is HTML. Hypertext Markup
Language is specifically designed for this purpose.As you are no doubt already aware,it
includes formatting control,syntax to include objects such as images,and is compatible
(with some variation) with a variety of operating systems and software.It is fairly simple,
so it is both easy to design and quick for a script to generate and deliver.
Drawbacks to using HTML for this application include limited support for print-
related formatting such as page breaks,little consistency in the output on different plat-
forms and programs,and variable quality printing.In addition,although HTML can
include any type of external element, the capability of the browser to display or use
these elements cannot be guaranteed for unusual types.
Word Processor Formats
Particularly for intranet projects,providing documents as word processor documents
makes some sense.However,for an Internet project,using a proprietary word processor
format will exclude some visitors,but given its market dominance,Microsoft Word
would make sense.Most users will either have access to Word or to a word processor
that will try to read Word files such as OpenOffice Writer.
Windows users without Word can download the freeware Word Viewer from
http://www.microsoft.com/office/000/viewers.asp
Generating a document as a Microsoft Word document has some advantages.As long as
you have a copy of Word,designing a document is easy.You have very good control over
the printed appearance of your documents and a lot of flexibility with its contents.You
can also make it relatively difficult for the recipient to modify by telling Word to ask for
a password.
Unfortunately,Word files can be large,particularly if they contain images or other
complex elements.There is also no easy way to generate them dynamically with PHP.
The format is documented but is a binary format, and the format documentation comes
with license conditions.It is possible to generate Word documents with a COM object,
but it’s definitely not simple.
Another new possibility you may now consider is OpenOffice Writer,which has the
dual advantages of not being proprietary software and using an XML-based file format.