2 Replies Latest reply on Aug 23, 2013 12:50 PM by Gary1

    Does CFDOCUMENT PDF Output Require Acrobat on CF Server?

    Gary1 Level 1

      When using PDF output in CFDOCUMENT, for correct, proper display of PDF files, does it require the full version of Adobe Acrobat to be installed on the ColdFusion production server?


      We are using ColdFusion 9 on development/staging/production servers.  I have one report that uses CFDOCUMENT with PDF as the output format.  When I run the report on my local development/staging server (which uses CF9 Developer Edition), the output looks great.  Background colors are displayed correctly (using CSS styles), page breaks work perfectly, etc.


      However, when I copy and run the report from our CF9 production server, the PDF output has no background colors.  Everything is in "black and white." 


      The only difference is that my local/staging server has the full ($199) version of Adobe Acrobat installed on it.  But our CF9 production servers do not have Acrobat installed (just the free Acrobat reader).


      I was going to try installing the free Acrobat 30-day trial version on the production server, to see if that made a difference.  But before I do, I thought I might check the forums first, to see if anyone might know about this. 


      I just don't know why I'm getting different output (color versus black & white), when the only difference in the programs and code, is the installation of Adobe Acrobat on the development/staging server.  Thank you for any help/advice.



        • 1. Re: Does CFDOCUMENT PDF Output Require Acrobat on CF Server?
          BKBK Adobe Community Professional & MVP

          Opening the PDF file has nothing to do with ColdFusion! In common use, the file is either opened by the browser or by a PDF reader.


          Suppose the code in your CFM page is of the form


          <cfdocument format="PDF">

          <!--- content --->



          When the CFM page is opened in the browser, the browser is instructed to use its PDF plugin (if it has one) to display the page as a PDF document. Display problems will therefore imply there are issues with the plugin.


          Suppose, on the other hand, that the code in your CFM page is of the form


          <cfdocument format="PDF" filename="test.pdf" overwrite="yes">

          <!--- content --->


          PDF saved as file


          When this CFM page is opened in the browser, the resulting PDF document is saved on the server. It is in this case that you may use a PDF reader to display it. However, that is inadvisable.


          Remember that you are now located at the server. It is not the business of the server to be displaying files of any kind. In other words, you should not even be thinking of installing a PDF reader on the server. What developers usually do, after saving the PDF file, is to add code that enables the client(browser) to download it. 

          • 2. Re: Does CFDOCUMENT PDF Output Require Acrobat on CF Server?
            Gary1 Level 1

            Thanks.  I was grasping for straws as to why the PDF would display correctly on a local/staging server, but not on our production server, even though same software versions, etc.  I had read that when using CFLOCATION and/or CFINCLUDE, the CSS Styles did not always work.  And that was my case.


            On our production server, we have NAM/I-Chain for security, to control who can access certain sites.  The URL used for production does not use the actual server name (which bypasses NAM/I-Chain), and that does allow the PDF file to display correct, with all the styles, fonts, intact.  But if accessed using the server's "advertised" name (e.g. www.MyDepartmentsServer.com/report1.cfm), the PDF does not use the CSS style sheet correctly, and the background colors, fonts, etc., are all gone.


            At least I found a temporary fix, although I'm not fond of displaying the server's actual host name in the response URL. However, since the user can only get to this point by using the "advertised" server name, we should be OK security wise.  Most web sites/reports check for this anyway, and won't run the template if it was accessed using a specific server name.  Thanks again for taking the time to help.