Accessibility

Table of Contents

Using DDX to unlock the potential of PDF manipulation in ColdFusion 8

A quick overview of the CFPDF tag

Before we get too far into what DDX is and how to use it, we need to take a look at the new CFPDF tag that was introduced in ColdFusion 8.  As its name suggests, this tag is used for manipulating PDF documents. It should be noted that CFPDF is only used for manipulating existing PDF documents. If you want to create a PDF document, that is a task for the CFDocument tag, which you can find more information on in the ColdFusion documentation.

As the ColdFusion documentation describes, the CFPDF tag allows you to:

  • Merge several PDF documents into one PDF document.
  • Delete pages from a PDF document.
  • Merge pages from one or more PDF documents and generate a new PDF document.
  • Linearize PDF documents for faster web display.
  • Remove interactivity from forms created in Acrobat® to generate flat PDF documents.
  • Encrypt and add password protection to PDF documents.
  • Generate thumbnail images from PDF documents or pages.
  • Add or remove watermarks from PDF documents or pages.
  • Retrieve information associated with a PDF document, such as the software used to generate the file or the author, and set information for a PDF document, such as the title, author, and keywords.

Now, a lot of this functionality is possible without the use of DDX, but DDX really gives the CFPDF tag its power. For example, not only can you merge pages from one or more PDF documents, but with DDX you can also build a table of contents for that document, set up the headers and footers on all pages, configure backgrounds or watermarks, and so forth. The list of possibilities is not endless, but it is much more than what we have ever had as ColdFusion developers without a lot of extra add-ons and trickery.

So, without further ado, let's see what capabilities Adobe has given us through the use of DDX.