cfpdf
8
3

Overview ColdFusion Open BlueDragon Lucee

Manipulates existing PDF documents. The following list describes some of the tasks you can perform with the cfpdf tag: Merge several PDF documents into one PDF document. Extract pages from multiple PDF documents and generate a new PDF document. Linearize multipage PDF documents for faster display. Encrypt or decrypt PDF files for security.

Attributes

Name Required Type Default Description
8
3
action No String processddx The action to take. Must be one of the following: addwatermark deletepages getinfo merge protect read removewatermark setinfo write (required)
9
addQuads No Boolean Add the position or quadrants of the thumbnail
9
algo No String Specifies the algorithm for image downsampling.
9
align No String Aligns the header and footer in PDF.
8
3
ascending No Boolean Order in which the PDF files are sorted: yes: files are sorted in ascending order no: files are sorted in descending order (optional, default=no)
11
author No Boolean false Authored signature
9
bottomMargin No Numeric Specifies the value of the bottomMargin
10
charset No String Charset to be used when extracting text from the PDF
9
compressTIFFs No Boolean Compress thumbnail which are in TIFF format.
8
3
copyfrom No String The filename of the PDF document from which to copy the watermark (optional)
8
3
ddxfile No String Owner or user password of the source PDF document, if the document is password-protected.
8
3
destination No String The pathname of the modified PDF document. If the destination file exists, you must set the overwrite attribute to yes. If the destination file does not exist, ColdFusion creates it as long as the parent directory exists. (optional)
8
3
directory No String Specify the directory of the PDF documents to merge. You must specify either the directory or the source. If you specify the directory, you must also specify the order. (optional)
9
encodeAll No Boolean Encode streams that are not encoded to optimize page content
8
3
encrypt No String Specify the type of encryption used on the source PDF document: RC4_40, RC4_128M, AES_128, none (optional)
3
filter No file filter, used with attribute directory
8
3
flatten No Boolean Specify whether the output file is flattened: yes: the formatting is removed and the file is flattened no: the format of the source PDF is maintained in the output file. (optional,default=no)
8
3
foreground No Boolean Specify whether the watermark is placed in the foreground of the PDF document: yes: the watermark appears in the foreground no: the watermark appears in the background (optional, default=no)
8
3
format No String jpg File type of thumbnail image output: * jpg * tiff * png
11
height No Numeric Height of the signature field.
9
hires No Boolean Sets a high resolution for the thumbnail if set to yes.
9
honourspaces No Boolean Set this option to "true" if you need characters to be converted to spaces.
9
hScale No Numeric Horizontal scale of the image to be modified. Valid values are hscale<1.
8
3
image No String Specify the image used as a watermark. You can specify a filename or a ColdFusion image variable. (optional)
8
3
imageprefix No String Prefix used for each image thumbnail file generated. The image filenames use the format: imagePrefix_page_n.format.
8
3
info No String Specify the structure variable for relevant information, for example, #infoStruct#. ColdFusion ignores read only information, such as the creation date, application used to create the PDF document, and encryption parameters. (required)
8
3
inputfiles No Struct Structure that maps the PDF source files to the input variables in the DDX file, or a string of elements and their pathname.
8
3
isBase64 No Boolean Specify whether the image used a watermark is in Base64 format: yes: the image is in Base64 format no: the image is not in Base64 format (optional, default=no)
9
jpgdpi No Numeric
8
3
keepbookmark No Boolean true Specify whether bookmarks from the source PDF documents are retained in the merged document: yes: the bookmarks are retained no: the bookmarks are removed (optional, default=no)
11
keyalias No String Alias of the private key in the keystore
11
keypassword No String The password corresponding to the given key alias
11
keystore No String Path to keystore
11
keystorepassword No String The password of the keystore
9
leftMargin No Numeric Specifies the value of the leftMargin
9
maxBreadth No Numeric Specifies maximum width of the thumbnail
9
maxLength No Numeric Specifies the maximum length of the thumbnail
9
maxScale No Numeric Specifies the maximum scale of the thumbnail
8
3
name No String Specify the PDF document variable name, for example, myPDFdoc. If the source is a PDF document variable, you cannot specify the name attribute again; you can write the modified PDF document to the destination. You can specify the destination attribute orthe name attribute, but not both. For the processddx action, the name represents the structure that is populated with the success or failure of the output variables.For the readsignaturefields action, the name represents the structurethats is populated with the info of all the signature fields in the source PDF document.For the validatesignature option, the name attribute contains a Boolean field denoting the signature validity and an array containing the names of all the invalid signatures. (optional)
8
3
newownerpassword No String Specify the password for the owner of the PDF document. (optional)
8
3
newuserpassword No String Specify the password for the user of the PDF document. (optional)
9
noAttachments No Boolean Removes all attachments from PDF documents.
9
noBookMarks No Boolean Remove bookmarks from PDF document
9
noComments No Boolean Remove comments from PDF document
9
noFonts No Boolean Remove font styling
9
noJavaScripts No Boolean Remove all document level JavaScript actions
9
noLinks No Boolean Remove external cross-references
9
noMetadata No Boolean Remove document information and metadata
9
noThumbnails No Boolean Remove embedded page thumbnails
9
numberFormat No String Specify the numbering format for PDF pages in the footer.
8
3
opacity No String Specify the opacity of the watermark. Valid values are integers in the range 0 (transparent) through 10 (opaque). (optional, default=3)
8
3
order No String Specify the order in which the PDF documents in the directory are merged: name: orders the documents alphabetically time: orders the documents by timestamp (required)
8
3
outputfiles No Struct Structure that contains the output files in the DDX file or string as keys and the pathname to the result file as the value.
9
overridepage No Boolean Specify whether to override page or not
8
3
overwrite No String Specify whether to overwrite the destination file: yes: overwrites the destination file no: does not overwrite the destination file (optional)
9
package No Boolean Create PDF packages
8
3
pages No String Page or pages in the source PDF document on which to perform the action. You can specify multiple pages and page ranges as follows: "1,6-9,56-89,100, 110-120".
8
3
password No String Specify the owner or user password of the source PDF document, if it exists. (optional)
8
3
permissions No String Specify the type of permissions on the PDF document: AllowPrintHigh AllowPrintLow AllowModify AllowCopy AllowAdd AllowSecure AllowModifyAnnotations AllowExtract AllowFillIn all none Except for all or none, you can specify a commaseparated list of permissions. (optional)
8
3
position No String Specify the position on the page where the watermark is placed. The position represents the top-left corner of the watermark. Specify the x and y coordinates; for example 50,30. (optional)
8
3
resolution No String Image quality used to generate thumbnail images: * high: use high resolution (uses more memory). * low: use low resolution.
11
result No String No Help Available
9
rightMargin No Numeric Specifies the value of the rightMargin
8
3
rotation No Numeric Specify the degree of rotation of the watermark image on the page; for example, 30. (optional)
8
3
saveoption No String full Save options for the PDF output: * full: normal save (default) * incremental: required to save modifications to a signed PDF document. * linear: for faster display.
8
3
scale No Numeric Size of the thumbnail relative to the source page. The value represents a percentage from 1 through 100.
8
3
showonprint No String Specify whether the watermark is printed with the PDF document: yes: the watermark is printed with the PDF document no: the watermark is not printed with the PDF document (optional)
11
signaturefieldname No String Sign (or unsign) that particular field if signature field exists in the document
8
3
source No String Specify the source. The source can be: The pathname to a PDF document; for example, c:\work\myPDF.pdf A PDF document variable in memory that is generated by the cfdocument tag or the cfpdf tag; for example, #myPDFdoc# The binary content of PDF document variable. (required)
8
3
stoponerror No Boolean false Valid only if the directory attribute is specified. If the specified directory contains files other then ColdFusion-readable PDF files, ColdFusion either stops merge process or continues. * yes: stops the merge process if invalid PDF files exist in the specified directory. * no: continues the merge process even if invalid files exist in the specified directory.
9
text No String Specify Text Value
9
topMargin No Numeric No Help Available
8
3
transparent No Boolean false Specifies whether the image background is transparent or opaque: foormat=png only * yes: the background is transparent. * no: the background is opaque.
8
3
type No String Specify the type to remove from the source PDF document: attachment bookmark watermark (optional)
11
unsignall No Boolean false Unsigns all the signature in the given document
9
useStructure No Boolean Specify whether to use structure or not
8
3
version No String (write) Specify the version of the PDF document to write. Valid values are: 1.1 1.2 1.3 1.4 1.5 1.6 (optional)
9
vScale No Numeric Vertical scale of the image to be modified. Valid values are vsacle<1.
11
width No Numeric Width of the signature field.