Solved

Using cfcontent and cfx_pdf tags

Posted on 2004-08-18
1
574 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

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.

Question has a verified solution.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

773 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