Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 946

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Working with Documents, Charts, and Reports
Creating PDF Portfolios
You can now create PDF packages using the
<cfpdf action="merge" package="yes" destination="./myBook/adobetest.pdf" overwrite="yes">
<cfpdfparam source="./inputFiles/c.zip" >
<cfpdfparam source="./inputFiles/d.jpg" >
<cfpdfparam source="./inputFiles/a.pdf" >
<cfpdfparam source="./inputFiles/z.txt" >
<cfpdfparam source="./inputFiles/MSTribute.pps" >
<cfpdfparam source="./inputFiles/Test1.docx" >
<cfpdfparam source="./inputFiles/NewMovie.mp3" >
<cfpdfparam source="./inputFiles/testserver.air" >
<cfpdfparam source="./inputFiles/123.xml" >
<cfpdfparam source="./inputFiles/New_test_case.xls" >
</cfpdf>
Flattening forms created in Acrobat
Flattening forms involves removing the interactivity from the form fields. This action is useful for displaying form data
and presenting it without allowing it to be altered. Use the
shows:
<cfpdf action="write" flatten="yes" source="taxForms\f1040.pdf"
destination="taxforms/flatForm.pdf" overwrite="yes">
<a href="http://localhost:8500/Lion/taxforms/flatForm.pdf">1040 form</a>
Note: If you flatten a prefilled form created in Acrobat, ColdFusion flattens the form and removes the data from the form
fields. When you specify a form created in Acrobat as a source file for
automatically flattens the form and removes data from the form fields, if the fields are filled in. ColdFusion does not
support flattening forms created in LiveCycle.
Linearizing PDF documents for faster web display
For efficient access of PDF files over the web, linearize PDF documents. A linearized PDF file is structured in a way
that displays the first page of the PDF file in the browser before the entire file is downloaded from the web server. As
a result linear PDF documents open almost instantly.
To linearize PDF documents, specify the
output file in linear format:
<cfpdf action="write" saveOption="linear" source="myBook.pdf" destination="fastBook.pdf"
overwrite="yes">
Note: Linearization can decrease performance when handling large documents.
Generating thumbnail images from PDF pages
Use the
action to generate thumbnail images from PDF pages. If you specify only the
thumbnail
the thumbnail action, ColdFusion automatically creates a directory relative to the CFM page called thumbnails where
it stores a generated JPEG image for each page in the document. The filenames are in the following format:
PDFdocumentName_page_n.JPG
For example, assume that the source file in the following example has 100 pages:
<cfpdf action="thumbnail" source="myBook.pdf">
ColdFusion generates the following files and stores them in the thumbnails directory:
attribute with the
package = "true"
action to flatten PDF forms, as the following example
write
merge
attribute of the
saveOption
Last updated 1/20/2012
action:
merge
action of the
tag, ColdFusion
cfpdf
action. The following example saves the
write
source
941
attribute with

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents