Download data conversion from coldfusion

PDF Generation in ColdFusion

To generate high quality PDFs from HTML documents, use the tags <cfhtmltopdf> and <cfhtmltopdfitem>. This document describes the usage and functionalities of these tags.

Terminology

The following terms are the commonly used in <cfhtmltopdf> (WebKit):

  • Service - Refers to the process which carries out series of activities to convert HTML documents to PDFs.
  • Service Manager - Manages the PDF generation service processes, monitors the service process states, spawns new processes for conversions, and facilitates recycling of processes.
  • WebKit - Is a layout engine software designed to allow web browsers to render web pages.

System requirements

PDF generation is supported on both Windows and Linux operating systems. On Windows, there are no additional requirements for generating PDFs. On Linux, ensure that the following additional requirements are met:

Additional package requirements

On Linux platforms, install the following additional packages:

X Window System

nss - softokn .i686

For instance, you can use yum to install these packages as shown below:

$ yum install glibc.i686

Additional font requirements

Also, you need to install a few required fonts for generating PDFs on Linux. To install the fonts, perform the following tasks:

Download the compressed filefont - ibm -type1-1.0.3.tar.gz or font- ibm -type1-1.0.3.zip.The compressed file contains the required fonts.

Extract the downloaded zip file to the/usr/share/fonts directory.

The new <cfhtmltopdf> tag

<cfhtmltopdf> creates high quality PDF output from a text block containing CFML and HTML using the PDF Service Manager.

The WebKit implementation for <cfhtmltopdf> is referred as PDFG (acronym of PDF Generator) which is shipped as part of the Jetty installer. The component running inside the Jetty server is referred as the service manager, which takes request for PDF conversion from one or many ColdFusion server/s.

The WebKit implementation for <cfhtmltopdf>:

  • Encapsulates the PDF conversion library.
  • Performs HTML to PDF conversion in process.

Using the remote PDF service manager

You need to use a remote PDF service manager instead of the local PDF service manager due to the following reasons:

  • When the ColdFusion Server is running on an OS not supported by the local PDF service manager
  • When performance of the local ColdFusion Server is critical as PDF generation is a CPU intensive operation.
  • When you want to distribute the load of generating the PDFs for maximum throughput.

Adding and editing the PDF service manager

From the Administrator console, click Data & Services > PDF Service.

You can add or edit a PDF service manager by providing the name, host name, port, and other configuration details.

To add or edit a remote service manager, you need to provide the details of Jetty service running on local or remote machine over which the service manager is deployed. Follow the instructions below to complete this process:

Using the remote service manager, you can add, edit, delete, enable, disable, and verify the service manager.

Working with the PDF service manager

PDF Service Managers section lists all the available PDF service managers.

The description for each Action button (in the above image) is as follows:

Enables users to edit the settings of the existing service manager.

Enables users to verify the current connection status of service manager.

Enables users to delete the PDF service.

Note: Verify All Service Manager button is used to verify all the listed PDF Service Managers.

Configuring the PDF service manager

To configure the PDF service manager, use the configuration file ( web.xml ) located at <cf_install_root>/<CF Instance>/jetty/webapps/PDFgServlet/WEB-INF/. The available configuration settings are:

About logging audit log details

PDF service manager logging is used to track service manager related issues and generates verbose log that contains complete details about the service and conversion request lifecycle. Use it to track the PDF conversion request.

Note: Logging should not be used for an extended period of time in a production environment. Extended use will produce large logs and impact performance.

The following sections describe the enhancements made to the PDF generation process.

The PDFG service logs will be available at <cf_install_root>cfusionjettywebappsPDFgServlet.

Support for restricted DDX elements

In ColdFusion, the restricted DDX elements are supported for the Enterprise Edition. See this document for the list.

Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

ColdFusion

Ask the Community

Post questions and get answers from experts.

PDF Generation in ColdFusion

To generate high quality PDFs from HTML documents, use the tags <cfhtmltopdf> and <cfhtmltopdfitem>. This document describes the usage and functionalities of these tags.

Terminology

The following terms are the commonly used in <cfhtmltopdf> (WebKit):

  • Service - Refers to the process which carries out series of activities to convert HTML documents to PDFs.
  • Service Manager - Manages the PDF generation service processes, monitors the service process states, spawns new processes for conversions, and facilitates recycling of processes.
  • WebKit - Is a layout engine software designed to allow web browsers to render web pages.

System requirements

PDF generation is supported on both Windows and Linux operating systems. On Windows, there are no additional requirements for generating PDFs. On Linux, ensure that the following additional requirements are met:

Additional package requirements

On Linux platforms, install the following additional packages:

X Window System

nss - softokn .i686

For instance, you can use yum to install these packages as shown below:

$ yum install glibc.i686

Additional font requirements

Also, you need to install a few required fonts for generating PDFs on Linux. To install the fonts, perform the following tasks:

Download the compressed filefont - ibm -type1-1.0.3.tar.gz or font- ibm -type1-1.0.3.zip.The compressed file contains the required fonts.

Extract the downloaded zip file to the/usr/share/fonts directory.

The new <cfhtmltopdf> tag

<cfhtmltopdf> creates high quality PDF output from a text block containing CFML and HTML using the PDF Service Manager.

The WebKit implementation for <cfhtmltopdf> is referred as PDFG (acronym of PDF Generator) which is shipped as part of the Jetty installer. The component running inside the Jetty server is referred as the service manager, which takes request for PDF conversion from one or many ColdFusion server/s.

The WebKit implementation for <cfhtmltopdf>:

  • Encapsulates the PDF conversion library.
  • Performs HTML to PDF conversion in process.

Using the remote PDF service manager

You need to use a remote PDF service manager instead of the local PDF service manager due to the following reasons:

  • When the ColdFusion Server is running on an OS not supported by the local PDF service manager
  • When performance of the local ColdFusion Server is critical as PDF generation is a CPU intensive operation.
  • When you want to distribute the load of generating the PDFs for maximum throughput.

Adding and editing the PDF service manager

From the Administrator console, click Data & Services > PDF Service.

You can add or edit a PDF service manager by providing the name, host name, port, and other configuration details.

To add or edit a remote service manager, you need to provide the details of Jetty service running on local or remote machine over which the service manager is deployed. Follow the instructions below to complete this process:

Using the remote service manager, you can add, edit, delete, enable, disable, and verify the service manager.

Working with the PDF service manager

PDF Service Managers section lists all the available PDF service managers.

The description for each Action button (in the above image) is as follows:

Enables users to edit the settings of the existing service manager.

Enables users to verify the current connection status of service manager.

Enables users to delete the PDF service.

Note: Verify All Service Manager button is used to verify all the listed PDF Service Managers.

Configuring the PDF service manager

To configure the PDF service manager, use the configuration file ( web.xml ) located at <cf_install_root>/<CF Instance>/jetty/webapps/PDFgServlet/WEB-INF/. The available configuration settings are:

About logging audit log details

PDF service manager logging is used to track service manager related issues and generates verbose log that contains complete details about the service and conversion request lifecycle. Use it to track the PDF conversion request.

Note: Logging should not be used for an extended period of time in a production environment. Extended use will produce large logs and impact performance.

The following sections describe the enhancements made to the PDF generation process.

The PDFG service logs will be available at <cf_install_root>cfusionjettywebappsPDFgServlet.

Support for restricted DDX elements

In ColdFusion, the restricted DDX elements are supported for the Enterprise Edition. See this document for the list.

Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

ColdFusion

Ask the Community

Post questions and get answers from experts.