Solved

Using cfcontent and cfx_pdf tags

Posted on 2004-08-18
1
565 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
Comment Utility
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
OpenLDAP set password to expire 7 436
what is  solution for slowness of web application 4 47
IIS 8.5 2 44
Problem to Eclipse 16 99
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now