CFDOCUMENT HTML PDF
Creates a PDF document from a text block containing CFML and HTML. You should use the cfdocument tag (with format=”PDF”) to generate the PDF by I could fake print-resolution by making a large image and scaling it in HTML. You can convert HTML-based reports into PDF or by wrapping the HTML in the cfdocument start.
|Genre:||Health and Food|
|Published (Last):||26 January 2007|
|PDF File Size:||17.90 Mb|
|ePub File Size:||3.14 Mb|
|Price:||Free* [*Free Regsitration Required]|
Default unit for the pageHeight, pageWidthand margin attributes: In-memory files speed processing of transient data. Specify the AllowModifyContents attribute to let viewers modify the document, assuming they have the required software. You can use the cfdocument and cfdocumentsection tags to fine-tune your printable output, as follows:.
You can use cfdocumentitem tags with or without the cfdocumentsection tag, as follows: Permission Description Printing Specify the AllowPrinting attribute to enable viewers to print the document. Specifies whether to retrieve image files directly from the local drive: You can use the cfhttp tag in combination with the cfdocument tag to display entire web pages in PDF or FlashPaper output hml, as the following example shows:. Use this option to reduce the size of the HTML output so that it fits on htnl paper.
After a bunch of reading that indicated modifying the image print size or resolution would not help, I tried adding a css style declaration to the image that specified a size in mm, and it worked!
Specifies whether ColdFusion embeds fonts in the output: This scope contains the following variables:. Interactive tags, such as formcfformand cfapplet. The cfdocument tag supports the following CSS styles: If you specify custom, you must also specify the pageheight and pagewidth attributes, can optionally specify margin attributes, and can optionally specify whether the units are inches or centimeters.
Creating PDF and FlashPaper output with the cfdocument tag
First the tag attributes. This format prints each page as a bitmap, so printing can be slower. LocalUrl is set to true to easily pull in a logo image from the local file system. Hrml one drawback is that it appears the developer has left this product out to pasture for a long time. Separate multiple permissions with a comma.
ColdFusion Help | cfdocument
This scope contains the following variables:. Frank Wiles 1, 10 Sign up using Email and Password.
Used in conjunction with filename. Specifies the submitted format of a PDF form. Specifies the report format. Divides output into sections, optionally specifying custom margins. You use one or more cfdocumentitem tags to specify headers and footers or to create a page break. Annotation Specify AllowModifyAnnotations to let viewers add comments to the document.
PDF is sent back to the browser instead of saving to a file. The developer site is still copyright and doesn’t mention anything past ColdFusion MX 6.
It can be one of the following values:. If users add annotations, they must save the PDF after making changes. MIME type of the source document. Specify the structure name in the attributeCollection attribute and use the tag’s attribute names as structure keys.
The following example shows how to specify bookmarks for document sections: Password required to access restricted permissions. A big thanks to Michael Hnat for pointing me in the right direction regarding Lucee with his very helpful blog post. Use the encryption attribute to specify whether PDF output is encrypted.
Specify a number less than For more information on the considerations related to embedding fonts, see Creating a simple report. User name to provide to the proxy server.