Using the <cfdocument> Tag

We’ll start with a really simple example. Listing 16.8 contains simple text wrapped within a pair of <cfdocument> tags. The generated output is seen in Figure 16.8.

Figure 16.8. Adobe PDF format is the most commonly used printable document format on the Web.
Listing 16.8. Print1.cfm—Basic PDF Generation
<!---
Name:        Print1.cfm
Author:      Ben Forta
Description: Simple printable output
Created:     07/10/2007
--->

<cfdocument format="pdf">
Hello world!
</cfdocument>

The code in Listing 16.8 couldn’t be simpler. By wrapping text in between <cfdocument> and </cfdocument> tags, content between those tags ...

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.