• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfdocument with pdf format never ends...

Guest
Apr 26, 2006 Apr 26, 2006

Copy link to clipboard

Copied

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

TOPICS
Advanced techniques

Views

261

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 28, 2006 Apr 28, 2006

Copy link to clipboard

Copied

LATEST
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> --->


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation