Adobe COLDFUSION 9 Manual page 941

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Working with Documents, Charts, and Reports
Optimizing PDF documents
To optimize a PDF document you can reduce the quality of the document. To reduce the quality of a PDF document
you can either downsample the images or remove unused objects from the document.
To downsample images the
algos
following code snippet generates a PDF after image downsampling:
<cfpdf action = "optimize" algo = "bicubic" source = "..\myBook.pdf" name = #myBook#>
To discard unused objects such as comments, JavaScripts, attachments, bookmarks, and metadata from your PDF
document using the following attributes with
<cfpdf action = "optimize"
noJavaScript
noThumbnails
noBookmarks
noComments
noMetadata
noFileAttachments
noLinks
nofonts>
Optimizing page count using encodeall
The new
attribute encodes all the unencoded streams in the source. However, it does not discriminate
encodeall
between dumb encodings like
Example:
<cfpdf action=write
source="./inputFiles/Source.pdf" destination="./outputFiles/Output.pdf"
encodeAll="yes">
Adding and deleting headers and footers from a PDF
You can add a header and footer to a PDF document using the
following snippet:
<!---addfooter--->
<cfpdf action = "addfooter"
source = "../myBook.pdf"
destination = "../myBookwithfooter.pdf"
image = "adobelogo.JPG" // Use this attribute to add an image in the footer
align = "right"> // By default, the alignemnt is center
<!---addheader--->
<cfpdf action = "addheader"
source = "../myBook.pdf"
destination = "../myBookwithheader.pdf"
text = "Adobe"
align = "left">
Specify the source where the PDF document is located and the destination where the new PDF document with the
header and footer will be saved.
You can also specify an image or text that you need to insert in the footer along with various other attributes such as
,
,
align
bottommargin
leftmargin
To remove header and footer from a PDF document, use the removeheaderfooter action, as shown in the following
snippet:
attribute is used with values
action:
optimize
and encodings like
LZW
flate
,
, and
numberformat
opacity
Last updated 8/5/2010
,
, and
bilinear
bicubic
, so only unencoded streams get
and
addheader
addfooter
.
. The
nearest_neighbour
encoded.
flate
actions, as shown in the
936

Advertisement

Table of Contents
loading

Table of Contents