Accessibility

ColdFusion Article

 

Printing Web Pages in FlashPaper or PDF Format with ColdFusion MX 7


Xu Chen

Xu Chen

ColdFusion Engineer

Sherman Gong

Sherman Gong

ColdFusion Engineer

Table of Contents

Created:
7 February 2005
User Level:
Beginner

Most of us, at one time or another, have experienced the poor result of printing web content from a browser. The page printout is ugly because the printer breaks the web content into pages with borders and edges. Trying to fix the HTML code with style sheets and other layout tricks still yields an unsatisfactory outcome. You, the ColdFusion developer, and your end users desperately need a solution for printing rich document formats.

Likewise, if you are on the road without Internet access and want to pass your work to a client who is outside your company firewall, you need a way to distribute documents easily.

You've already invested an enormous amount of time and resources setting up and publishing web pages and articles so they look just the way you want. You don't want to rework them just to generate a rich document—you need an easy conversion tool.

If you have ever encountered any of the problems above, fear not. The ColdFusion team heard you.

Introducing the cfdocument tag. This new ColdFusion MX 7 feature takes your current HTML/CFML pages and converts them into Macromedia FlashPaper or Adobe PDF formats in seconds. Best of all, using this tag requires no learning curve. In this article, we explain how the ColdFusion team created this new functionality and how you can use it to create printable web documents.

Credits

Xu Chen and Sherman Gong developed this technology jointly. Xu designed the cfdocument architecture and provided the tag's implementation and PDF output format. Sherman Gong provided the FlashPaper format support and font management, and worked on the links and anchors support with Xu. Hiroshi Okugawa and Collin Tobin provided quality assurance for the cfdocument tag and numerous other ColdFusion features.

Requirements

To complete this tutorial you will need to install the following software and files:

ColdFusion MX 7

Prerequisite knowledge:

Familiarity with ColdFusion tag syntax

Article available in FlashPaper or PDF format:

Flash PaperPrinting Web Pages in FlashPaper or PDF Format with ColdFusion MX 7 (Flash or PDF, 328K)

About the authors

Xu Chen has been a senior software engineer with Macromedia since the days of Allaire Corporation (in 2000). He worked on ColdFusion 5 and 6, helping to migrate ColdFusion from C++ to the Java platform. He just finished working on the release of ColdFusion MX 7. He has over a decade of software development experience and holds Bachelor's degrees in Computer Science and Electrical Engineering from Worcester Polytechnic Institute of Massachusetts. He is currently pursuing an MBA from Babson College.
Sherman Gong joined Macromedia in the midst of ColdFusion 5 development and has been with the company as a principal software engineer since 2000. He has 15 years of experience in software development, ranging from aerospace systems to financial trading systems. For the ColdFusion MX 7 release, he was responsible for font management tasks, cfreport, and FlashPaper output in the cfdocument tag.