For the complete experience, please enable JavaScript in your browser. Thank you!

  • Creative Cloud
  • Photoshop
  • Illustrator
  • InDesign
  • Premiere Pro
  • After Effects
  • Lightroom
  • See all
  • See plans for: businesses photographers students
  • Document Cloud
  • Acrobat DC
  • eSign
  • Stock
  • Elements
  • Marketing Cloud
  • Analytics
  • Audience Manager
  • Campaign
  • Experience Manager
  • Media Optimizer
  • Target
  • See all
  • Acrobat Reader DC
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player
  • All products
  • Creative Cloud
  • Individuals
  • Photographers
  • Students and Teachers
  • Business
  • Schools and Universities
  • Marketing Cloud
  • Document Cloud
  • Stock
  • Elements
  • All products
  • Get Support
    Find answers quickly. Contact us if you need to.
    Start now >
  • Learn the apps
    Get started or learn new ways to work.
    Learn now >
  • Ask the community
    Post questions and get answers from experts.
    Start now >
    • About Us
    • Careers At Adobe
    • Investor Relations
    • Privacy  |  Security
    • Corporate Responsibility
    • Customer Showcase
    • Events
    • Contact Us
News
    • 3/22/2016
      Adobe Summit 2016: Are You An Experience Business?
    • 3/22/2016
      Adobe Announces Cross-Device Co-op to Enable People-Based Marketing
    • 3/22/2016
      Adobe and comScore Advance Digital TV and Ad Measurement
    • 3/22/2016
      Adobe Marketing Cloud Redefines TV Experience
Assembling PDF Documents / 

About assembling PDF documents

Adobe Community Help


Applies to

  • ColdFusion

Contact support

 
By clicking Submit, you accept the Adobe Terms of Use.
 

You use the cfpdf tag to assemble PDF documents in Adobe ColdFusion. The tag provides several actions for creating unified output files from multiple sources, as the following table shows:

Action

Description

addWatermark

Adds a watermark image to one or more pages in a PDF document.

deletePages

Deletes one or more pages from a PDF document.

addheader

Adds header to a PDF document.

addfooter

Adds footer to a PDF document.

removeheaderfooter

Removes header and footer from a PDF document.

optimize

Reduces the quality of PDF documents by image downsampling and removing unused objects.

extracttext

Extracts text from the specified pages or the entire PDF documents

extractimage

Extracts images from the specified pages or the entire PDF document

transform

Performs page level transformations

getInfo

Extracts information associated with the PDF document, such as the author, title, and creation date.

merge

Assembles PDF documents or pages from PDF source files into one output file.

processddx

Extends the cfpdf tag by providing a subset of Adobe® LiveCycle™ Assembler functionality. This action is the default.

protect

Password-protects and encrypts a PDF document.

read

Reads a PDF document into a ColdFusion variable.

removeWatermark

Removes watermarks from specified pages in a PDF document.

setInfo

Sets the Title, Subject, Author, and Keywords for a PDF document,

thumbnail

Generates thumbnail images from specified pages in a PDF document.

write

Writes PDF output to a file. Also use to flatten forms created in Acrobat and linearize documents.

Note: You cannot use the cfpdf tag to create a PDF document from scratch. To create a PDF document from HTML content, use the cfdocument tag. Also, you can use Report Builder to generate a report as a PDF document. Instead of writing a PDF document to file, you can specify a PDF variable generated as the source for the cfpdf tag.

All but one of the cfpdf tag actions provide shortcuts to common tasks; for example, with one line of code, you can add a watermark image to one or more pages in an output file, merge all the PDF documents in a directory into a single output file, or password-protect a PDF document. ColdFusion provides two ways to extend the functionality of the cfpdf tag: the cfpdfparam tag and the processddx action.
You use the cfpdfparam tag only with the merge action of the cfpdf tag. The cfpdfparam tag gives you more control over which files are included in the output file; for example you can merge pages from multiple files in different directories.
The processddx action extends the cfpdf tag by providing a subset of Adobe LiveCycle Assembler functionality. You use the processddx action to process Document Description XML (DDX) instructions explained in Using DDX to perform advanced tasks. Using DDX instructions requires more coding, but it lets you perform complex tasks, such as generating a table of contents and adding automatic page numbers.
Also, ColdFusion provides three functions for PDF file, DDX file, and PDF variable verification:

Function

Description

IsDDX

Determines whether a DDX file, path, and instructions are not null and are valid. Also verifies that ColdFusion supports the schema used for the DDX instructions.

IsPDFFile

Determines whether a PDF source file, path, and version are valid and supported on the server running ColdFusion. Also verifies whether a PDF file is corrupted.

IsPDFObject

Determines whether a PDF object stored in memory is valid. Also verifies the contents of PDF variables generated by the cfdocument and cfpdf tags.

The following table describes a few document assembly tasks that you can perform with ColdFusion:

Task

Action

Add a generated table of contents to a PDF document

cfpdf action="processddx" with the TableOfContents DDX element{{cfpdf action="extracttext"}} can also be used.

Add automatic page numbers to a PDF document

cfpdf action="processddx" with the _PageNumber and _LastPagenumber built-in keys. Valid only in the Header and Footer DDX elements.

Add headers and footers to a PDF document

cfpdf action="processddx" with the Header and Footer DDX elementsor{{cfpdf action="addheader"}} and cfpdf action="addfooter"

Add or remove watermarks

cfpdf action="processddx" with the Watermark and Background DDX elements{{cfpdf action="addWatermark"}} and cfpdf action="removeWatermark"

Change the encryption algorithm for PDF documents

cfpdf action="protect" encrypt="encryption algorithm"

Change user permissions on a PDF document

cfpdf action="protect" newOwnerPassword="xxxxx"permissions="comma-separated list"

Delete pages from a PDF document

cfpdf action="deletePages"

Extract text from a PDF document and export it to an XML file

cfpdf action="processddx" with the DocumentText DDX element

Flatten (remove interactivity from) forms created in Acrobat

cfpdf action="write" flatten="yes"

Generate thumbnail images from PDF document pages

cfpdf action="thumbnail"pages="}}page numbers{{"

Linearize PDF documents for faster web display

cfpdf action="write" saveOption="linear"

Merge pages and page ranges from multiple documents in different locations into one PDF document

cfpdf action="merge" with multiple cfpdfparam tags

Merge PDF documents in a directory into one PDF document

cfpdf action="merge" directory="path"

Password-protect PDF documents

cfpdf action="protect" newUserPassword="xxxx"

Set the initial view for a PDF document

cfpdf action="processddx" with the InitialViewProfile DDX element

Create different versions of a PDF document

Duplicate function to clone PDF variables

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy

Choose your region United States (Change)   Products   Downloads   Learn & Support   Company
Choose your region Close

Americas

Europe, Middle East and Africa

Asia Pacific

  • Brasil
  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Cyprus - English
  • Česká republika
  • Danmark
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Greece - English
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • Malta - English
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • Southeast Asia (Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam) - English
  • 台灣

Commonwealth of Independent States

  • Includes Armenia, Azerbaijan, Belarus, Georgia, Moldova, Kazakhstan, Kyrgyzstan, Tajikistan, Turkmenistan, Ukraine, Uzbekistan

Copyright © 2016 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy | Cookies

AdChoices