How to setup PDFg server in ColdFusion 11 on Linux

ColdFusion 11 was released on April 29, 2014 and shortly after the release, the support for PDFg (<cfhtmltopdf>) on Linux came into picture. Recently Adobe blogged for the same here. As on date, this feature is not supported on Mac/Solaris environments. The recommendation by Adobe, is to utilize the remote capability of the service installed on a supported platform.

Recently, Abram pinged me on twitter. He was having some difficulties while working with PDFg service. So, I thought of publishing a “Steps to be followed” article, to help everyone.

If you are going for a fresh ColdFusion installation and wish to use PDF generation functionality in CF11 on linux, then this section is worth a try.

  1. Download the latest installer from http://www.adobe.com/cfusion/tdrc/index.cfm?product=coldfusion
  2. Follow the installation procedure after the download and complete the installation.
  3. Navigate to /ColdFusion11/cfusion/jetty and type ./cfjetty start.
  4. Start ColdFusion service and navigate to CF Admin.
  5. Under the CF Admin, check “Data & Services > PDF Service” section. You will see the local server manager for PDF.
  6. Now you need to install the additional packages & fonts, as mentioned at https://wikidocs.adobe.com/wiki/display/coldfusionen/PDF+Generation+in+ColdFusion
  7. You can take assistance from http://blog.immanuelnoel.com/2014/07/15/coldfusion-11-pdf-service-prerequisites-on-linux/ for installing the additional packages & fonts.
  8. Start the “Local” service manager in CF Admin OR “Verify All Service Managers” to verify it.

Once done, check the <cfhtmltopdf> functionality and create a pdf. You can use the below code snippet, to test.

<cfhtmltopdf>
This is a test <cfoutput>#now()#</cfoutput>
</cfhtmltopdf>

In case you have an existing ColdFusion 11 installation on linux, then please try the following:-

  1. Download the Add-on Services Installers for ColdFusion 11 fromhttps://www.adobe.com/support/coldfusion/downloads.html#cf11devtools
  2. The installation directory should point to your existing “jetty” folder location. The default location is /ColdFusion11/cfusion/jetty/.
  3. Follow the onscreen instructions and complete the installation.
  4. Navigate to /ColdFusion11/cfusion/jetty/ and type ./cfjetty start.
  5. Start ColdFusion service and navigate to CF Admin.
  6. Under the CF Admin, check “Data & Services > PDF Service” section. You will see the local server manager for PDF.
  7. Now you need to install the additional packages & fonts, as mentioned at https://wikidocs.adobe.com/wiki/display/coldfusionen/PDF+Generation+in+ColdFusion
  8. You can take assistance from http://blog.immanuelnoel.com/2014/07/15/coldfusion-11-pdf-service-prerequisites-on-linux/ for installing the additional packages & fonts.
  9. Start the “Local” service manager in CF Admin OR “Verify All Service Managers” to verify it.

Once done, check the <cfhtmltopdf> functionality and create a pdf. You can use the below code snippet, to test.

<cfhtmltopdf>
This is a test <cfoutput>#now()#</cfoutput>
</cfhtmltopdf>

In case, you come across a different error or scenario, feel free to share.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s