Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Using cfcontent and cfx_pdf tags

Posted on 2004-08-18
1
575 Views
Last Modified: 2013-12-24
Try as I may I cannot for the life of me get my code to work. Whats worse is that I got this to work a few months ago but accidentally deleted the code and now I cant get it to work again. Heres the code

<html>
<head>
<title>page</title>
</head>

<cfoutput>
<cf_pdf file="cert.pdf" allowprinting="true" allowcopy="false" allowmodify="false">
<cf_pdf_page size="LETTER">
<cf_pdf_image x="35" y="690" file="ft-letterhead.jpg">
</cf_pdf_page>
</cf_pdf>
</cfoutput>

<cfcontent type="application/pdf"
deletefile="yes"
file="C:\websites\tx4x4f\database\cert.pdf">


<body>
<a href="cert.pdf">Here</a>1

</body>

</html>

The problem is that the pdf wont open. The pdf generates fine without the use of the cfcontent. I cant see the problem with my use of the tag though.

I have played with every combination of the code and I know that its something thats really simple but I think I've been staring at this page way too long. Maybe a fresh set of eyes can help.

Thanks
-Jamaal
0
Comment
Question by:jackassery
1 Comment
 
LVL 35

Accepted Solution

by:
mrichmon earned 125 total points
ID: 11835270
You cannot have other things on the page when using cfcontent.

So you need to remove :

<body>
<a href="cert.pdf">Here</a>1

</body>

</html>

etc.


Your page should look like :

<cfoutput>
<cf_pdf file="cert.pdf" allowprinting="true" allowcopy="false" allowmodify="false">
<cf_pdf_page size="LETTER">
<cf_pdf_image x="35" y="690" file="ft-letterhead.jpg">
</cf_pdf_page>
</cf_pdf>
</cfoutput>

<cfcontent type="application/pdf"
deletefile="yes"
file="C:\websites\tx4x4f\database\cert.pdf">
0

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
website file permissions 4 77
Unsearchable in Google,Yahoo and Bing. 6 63
WAMP server installation, getting error popups, DLLs missing 5 80
System Analysis 5 61
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question