Solved

Create Dynamic PDF in CF

Posted on 2002-07-29
8
2,792 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 200 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

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

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

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 …
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

734 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