?
Solved

Create Dynamic PDF in CF

Posted on 2002-07-29
8
Medium Priority
?
2,797 Views
Last Modified: 2013-12-24
Hello EE'ers,
Is it possible to ceate a dynamic PDF on the fly on the server and have it emailed as an attachment?

I am developing an online certification program... the client will have a template certification PDF file on the server... I will need to dynamically add the "student's" name and the courses completed onto the PDF and dynamically email a confirmation of completion as well as attach the PDF to the email... is this even possible?

Thank you,
JimS.
aka
TenTonJim
0
Comment
Question by:TenTonJim
[X]
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
8 Comments
 
LVL 3

Expert Comment

by:SewellM
ID: 7186669
A good place to start looking into creating pdf's from cf is CFComet.
http://www.cfcomet.com/pdf/

You can also go to the CF exchange on the macromedia site.  They have about 30 tags (some free/ some not) for use with pdf's.  
http://devex.macromedia.com/developer/gallery/SearchResults.cfm?keywords=PDF

Once it is created, just attach it to the email just as you would any attachement.

Hope this sends you in the right direction.

Michael
0
 
LVL 2

Author Comment

by:TenTonJim
ID: 7186880
Michael these examples kick a**! Let me check it out, if it works you get the points! Thanks a lot!!!

JimS.
0
 
LVL 6

Accepted Solution

by:
dash420 earned 800 total points
ID: 7187065
yah one tool called as htmldoc is available. it will convert the html page to PDF. u can download that and call the tool from cf.

http://www.easysw.com/software.html
0
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 

Expert Comment

by:davidola
ID: 7203221
Yes, you can, you need to create a Form Document Format(FDF) file with the form fields and then create a similar PDF file, you will then pass the names into the formfields then to merge the FDF and the PDF file to create a dynamic full PDF page.
0
 
LVL 2

Author Comment

by:TenTonJim
ID: 7203814
OK I have found one that is allowing me to create PDF's on the fly, yet there is a bug in trying to add an image to the PDF... (won't work at all)

This client requires that it look like their *real* certificate of completion... so I need to add a huge background image... the ADDIMAGE in this code below is causing it to fail...

to see it minus the ADDIMAGE reference go to
http://apawood.org/pdfprint2/pdf4.cfm

the one WITH the reference to ADDIMAGE is at
http://apawood.org/pdfprint2/pdf5.cfm
you will see the error it generates...

the 2 pages are identical other than one is asking for an image (the image is in the same folder)

Here is the code below:
-----------------------------------------
<cf_pdf action="init"
               file="e:\InetPub\wwwroot\apawood\pdfprint2\pdfout.pdf"
               fonts="Arial|Arial,Bold">

<cf_pdf action="startpage">

<cf_pdf action="addtext"
               text="this is a test sentence"
               x="15"
               y="690"
               fontsize="48">

<cf_pdf action="addtext"
               text="this is a test bold sentence of the emergency APA Wood certificate program."
               horizscale="110"
               fillcolor="0 0 1"
               outlinecolor="1 1 0"
               x="5"
               y="650"
               fontnum="2"
               fontsize="14">

<cf_pdf action="drawrect"
               x1="0"
               y1="590"
               x2="55"
               y2="610"
               width="2"
               outlinecolor="1 1 0"
               fillcolor="0 1 0">

<cf_pdf action="drawline"
               x1="200"
               y1="580"
               x2="400"
               y2="580"
               width="1"
               color="1 0 0">

<cf_pdf action="addlink"
               x="50"
               y="560"
               href="http://www.google.com"
               width="350"
               fontsize="12"
               outlinecolor="0 0 1"
               outlinewidth="1">

<cf_pdf action="ADDIMAGE"
               x="200"
             y="100"
             filename="iconhat.gif"
             width="180"
             height="180">

<cf_pdf action="endpage">

<cf_pdf action="finish">


<html>
<head>
<title>Congratulations!</title>
<link rel="stylesheet" type="text/css" href="../js/ie_styles.css">
</head>
<body>
<div style="margin-top:10%;padding:30px;font-size:10pt;background-color:lightyellow;color:navy;text-align:center">
<h2>Congratulations!</h2>
<p>You have completed the SOMEFILE course!</p>
<p>Click <a href="pdfout.pdf">HERE</a> to print your Certificate of Completion! [Adobe PDF Format :: 10kb file]</p>
</body>
</html>
-----------------------------------------

I have not given up :) and thank you everyone for your suggestions... davidola do you have any examples of this FDF to PDF I have never heard of this technique much less know how to code it. Thanks!

Thank you,
JimS.


0
 
LVL 1

Expert Comment

by:joezizzo
ID: 7650803
hey, if you're still looking for a cf/html to pdf solution, FO might be the answer for you.  activePDF and the custom tags out there are buggy, but FO is pretty clean--just a brand of xml.  You need the FOP (formatting objects processor) from apache...
http://xml.apache.org/fop/index.html

Couldn't hurt to take a look, right?
0
 
LVL 2

Author Comment

by:TenTonJim
ID: 8422355
Thanks dash420 that is what I went with.
Thanks everyone!
JimS.
0
 
LVL 6

Expert Comment

by:dash420
ID: 8425261
Thanks

Regards,
Dash
0

Featured Post

Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals is required.

Question has a verified solution.

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

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
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…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

718 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