1 Reply Latest reply on Apr 28, 2006 12:28 AM by BKBK

    cfdocument with pdf format never ends...

    rbarrett2
      Hello,

      I'm trying to output a document in pdf format using cfdocument. However, the page never finishes. I eventually have to close the page manually.

      My code is as follows:

      Does anyone have any ideas as to what might be wrong?

      Thanks,
      Robert

        • 1. cfdocument with pdf format never ends...
          BKBK Adobe Community Professional & MVP
          I'll suppose you realize that cfdocument simply takes a PDF "snapshot" of the content of the tag. Hence, even if your code works, it will not display the HTML from the included file. Take even an intuitive alternative like


          <cfsavecontent variable="content">
          <cfinclude template="OrderForm#form.ManufacturerID#.cfm">
          </cfsavecontent>
          <cfdocument format="pdf" filename="d:\benchmark\pdf\#filename#.pdf" overwrite="yes">
          <cfoutput>#content#</cfoutput>
          </cfdocument>


          It, too, will create a PDF containing the contents of the included file, and store it in d:\benchmark\pdf\. However, as before, no content is displayed on the current page.

          The only other issue I can think of is an error in the included file. To eliminate that possibility, verify that the following code runs

          <!--- <cfset filename = filename & ".pdf"> --->
          <!--- <cfdocument format="pdf" filename="d:\benchmark\pdf\#filename#" overwrite="yes"> --->

          <cfinclude template="OrderForm#form.ManufacturerID#.cfm">
          <!--- </cfdocument> --->