<cfdocument>

Creates a PDF document from a text block containing CFML and HTML.

This tag may have a body.

This tag is also supported within <cfscript>

Attribute Description
marginbottom
number, optional

Specifies the bottom margin in inches (default) or centimeters. To specify bottom margin in centimeters, include the unit=cm attribute.

useragent
string, optional

Text to put in the HTTP User-Agent request header field. Used to identify the request client software.

permissions
string, optional

define permissions for the file (AllowPrinting,AllowModifyContents,AllowCopy,AllowModifyAnnotations,AllowFillIn,AllowScreenReaders,AllowAssembly,AllowDegradedPrinting)

filename
String, optional

name for output file, if not defined output will be written to response stream

proxyuser
string, optional

When required by a proxy server, a valid username.

htmlbookmark
boolean, optional

If true, it is possible to convert outlines to a list of named anchors (<a name="anchor_id">label</a>) or a headings structure (<h1>...<h6>). Transforming of HTML hyperlinks to PDF hyperlinks (if not explicitly disabled). Hyperlink jumps within the same document are supported as well

proxyhost
string, optional

alias for proxyHost

saveasname
string, optional

(format="PDF" only) The filename that appears in the SaveAs dialog when a user saves a PDF file written to the browser.

pageheight
number, optional

used when pagetype is custom

localurl
boolean, optional

Specifies whether to retrieve image files directly from the local drive

name
string, optional

name of a variable to store the output in it

authuser
string, optional

User name sent to the target URL for Basic Authentication. Combined with password to form a base64 encoded string that is passed in the Authenticate header. Does not provide support for Integrated Windows, NTLM, or Kerberos authentication.

fontembed
string, optional

define if fonts will embedded with the file

pagetype
string, optional

defined the used format for the page (,legal,letter,A4,A5,B4,B5,B4-JIS,B5-JIS and custom)

encryption
String, optional

define if the output should be encrypted and how deep

src
string, optional

define a url or or a relative path on the local system to a file that should be transferred to a pdf

format
string, optional

format of the created file

bookmark
boolean, optional

Specifies whether bookmarks are created in the document

proxyport
number, optional

The port number on the proxy server from which the object is requested. Default is 80. When used with resolveURL, the URLs of retrieved documents that specify a port number are automatically resolved to preserve links in the retrieved document.

backgroundvisible
boolean, optional

Specifies whether the background prints when the user prints the document

proxypassword
string, optional

When required by a proxy server, a valid password.

marginright
number, optional

Specifies the right margin in inches (default) or centimeters. To specify right margin in centimeters, include the unit=cm attribute.

marginleft
number, optional

Specifies the left margin in inches (default) or centimeters. To specify left margin in centimeters, include the unit=cm attribute.

authpassword
string, optional

Password sent to the target URL for Basic Authentication. Combined with username to form a base64 encoded string that is passed in the Authenticate header. Does not provide support for Integrated Windows, NTLM, or Kerberos authentication.

scale
number, optional

define a scale factor as a percentage. this option is used to reduce the size of the HTML output so that it fits on that paper. define a number less than 100.

pagewidth
number, optional

used when pagetype is custom

ownerpassword
string, optional

Specifies an owner password (format="PDF" only).

userpassword
string, optional

Specifies a user password (format="PDF" only). Defaults to "empty" if is not set, and encyption is set to 40 bit or 128 bit.

unit
string, optional

set the unit for pageheight, pagewidth, and margin...

overwrite
boolean, optional

define if an existing file will be overwritten or not

srcfile
string, optional

define an absolute path to a file that should be transferred to a pdf

orientation
string, optional

is the orientation landscape or portrait

margintop
number, optional

Specifies the top margin in inches (default) or centimeters. To specify top margin in centimeters, include the unit=cm attribute.

mimetype
string, optional

mimetype of the source (when attribute src or srcfile are defined)

<cfdocument
    [marginbottom=number]
    [useragent=string]
    [permissions=string]
    [filename=String]
    [proxyuser=string]
    [htmlbookmark=boolean]
    [proxyhost=string]
    [saveasname=string]
    [pageheight=number]
    [localurl=boolean]
    [name=string]
    [authuser=string]
    [fontembed=string]
    [pagetype=string]
    [encryption=String]
    [src=string]
    [format=string]
    [bookmark=boolean]
    [proxyport=number]
    [backgroundvisible=boolean]
    [proxypassword=string]
    [marginright=number]
    [marginleft=number]
    [authpassword=string]
    [scale=number]
    [pagewidth=number]
    [ownerpassword=string]
    [userpassword=string]
    [unit=string]
    [overwrite=boolean]
    [srcfile=string]
    [orientation=string]
    [margintop=number]
    [mimetype=string]
><!--- body --->[</cfdocument>]

Examples

There are currently no examples for this tag.

See also