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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.