Dynamic PDF Creation?

Hi

I am currently building a site where we need to dyanmically generate a PDF based on information the customer enters. I have been looking through the various options for different languages (CF, PHP, ASP e.t.c.) but am really a bit lost.

What i need to do is either take an existing "template" PDF from the server and fill certian areas with various information OR generate an HTML version of the same thing and then convert it to a PDF (as long as the PDF output looks as it should), the first option is the most preferable though.

I also need to be able to protect the PDF from being editable (Very important).

The entire site is written in ColdFusion so it would make most sense to use that but i am prepared to use whatevers best for the job. Does anyone have any recomendations or suggestions on what i could do.

Also whatever i use has to be able to be run on the JodoHost servers (im not sure if there are any restrictions?).

Thanks in advance,

Jack

P.S. Sorry if this is in the wrong place, i wasnt sure which forum to post in.
 
Have you checked the CF Exchange on Macromedia's site? There are quite a few custom tags there that write and/or convert PDFs. We've got a project coming up in which we're going to have to do the same, so I was in there poking around a couple weeks ago. I haven't actually tried to implement any of them yet, but remember seeing quite a few that by description, seemed to do everything we need.

http://www.macromedia.com/cfusion/exchange/index.cfm?view=sn130

Search on PDF... you'll need to do a bit of sifting, but that should get you a bunch of results.
 
Yeah i have looked on there, there are quite a few but they all seem to either cost quite alot (which we dont mind doing if we HAVE to, but would rather not) or they need a program installed on the server called HTMLDOC which is called using CFEXECUTE which is disabled.

Authough i do know that the CFEXECUTE tag is in the custom tag .cfm file in the "cfusion" directory and not in a file in the server directory so maybe would be allowed? Maybe Yash or one of the admins could answer this?

Jack
 
Actually, when you disable CFExecute it becomes global.
You can't allow it for specific programs :(
 
VPS is a linux account. We don't install Cold Fusion there

CFExecute is a massive security risk by any standard. You can upload a virus and then execute it from your code.
 
Yeah thats fair enough, never mind.

I have got another custom tag called cfx_pdf (cfxpdf generator) which uses a java .jar file. Would this be possible to set up?

I have posted the install instructions below just incase you wanted to see what it involved...

---------------------------

1. Place all of the CFM files that come with the archive into your CustomTags directory on your server. On Windows this is located at C:\CFusionMX\CustomTags on Unix it is generally /opt/coldfusionmx/CustomTags.

2. Place the CFX_PDF.jar file into your java cfx directory. On Windows this is located at C:\CFusionMX\cfx\java on Unix it is generally /opt/coldfusionmx/cfx/java/.

3. Log in to the Coldfusion Administrator

4. From the side menu choose ?Java and JVM? under ?SERVER SETTINGS?

5. Make sure that with in the ?Class Path? that the JAR file you?ve placed into your CFX Java directory is listed in there. Your Class Path should look something like this: ?C:/CfusionMX/cfx/java/,C:/CfusionMX/cfx/java/CFX_PDF.jar,? (Windows) ?/opt/coldfusionmx/cfx/java/,/opt/coldfusionmx/cfx/java/CFX_PDF.jar,? (Unix) One you?ve setup your class path click ?Submit Changes? (Coldfusion MX on Windows ? Setup Screen ?Java and JVM Settings?)

6. From the side menu choose ?CFX Tags? under ?EXTENSIONS? 11

7. Choose ?Register Java CFX? (Coldfusion MX on Windows ? Setup Screen ?CFX Tags?)

8. Set the ?Tag Name? to ?cfx_pdf? and the ?Class Name? to ?CFX_PDF? this is case sensitive so make sure this is inputted uppercase. Once you?re finished click ?Submit?. (Coldfusion MX on Windows ? Setup Screen ?Add/Edit Java CFX Tag?)

9. Your ready to go! You may need to reboot your Coldfusion service depending on your internal setup. Place some of the CFM files in the examples directory onto your web server to confirm that everything is working properly.

---------------------------

Website:
http://www.easel2.com/cfxpdf_support.html
 
jacksleight said:
Yeah i have looked on there, there are quite a few but they all seem to either cost quite alot (which we dont mind doing if we HAVE to, but would rather not) or they need a program installed on the server called HTMLDOC which is called using CFEXECUTE which is disabled.


Ah...sorry about that. The project I was researching for is for my "real" job and my company actually hosts the site internally, so I didn't even pay attention to that kind of stuff. Would be interested to here what Jodohost says about the one you mentioned though, cause it would definitely be a handy thing to have for my freelance projects as well.
 
jacksleight said:
I am currently building a site where we need to dyanmically generate a PDF based on information the customer enters. I have been looking through the various options for different languages (CF, PHP, ASP e.t.c.) but am really a bit lost.

I use iTextSharp in ASP.NET with C#. It works well enough. You basically build tables and cells to create the format you need.

If you'd consider ASP.NET, take a look at http://itextsharp.sourceforge.net/
 
Big EDIT:

This is a paid component. We have to review it and I don't promise that we'll buy it. We don't make these decisions in one day
 
Watson,
Cheers, i will have a look at that.

Yash,
I wasnt expecting you to buy it or anything, i was just considering it at the moment. Im currently looking into an ActiveX server component that adobe make themselves which may do the job as well, and its free. Would involve putting their dll in in the windows system32 folder and registering it with the regsvr32 utility. Do you think this is feasible?

P.S. Sorry for asking so many questions, just trying to work out what might be possible.
 
Actually it dosent look like that adobe component does what i wanted it to :( .

Biomilk,
Thanks, i had a look but the non demo version costs $450, and thats the cheap one :(. Never mind, the search goes on...

Jack
 
I really doubt that you'll find a PDF converter cheaply. I've looked into them in the past several times because I wanted to do the exact same thing, but... They were all always too expensive.

Also, the quality/functionality of different PDF creators varies VERY widely. Some are great (read thousands of dollars) while others can do most jobs (read hundreds of dollars).

Unless something new has come out in the last couple months, I don't know of anything that will meet your needs cheaply.

On a side note, Open Office can produce PDFs, but I don't know if you can use it like a server component. If you can, then perhaps something like FireDaemon would let you access it as a service and then you could use a scripting engine to run a command against it, if it allow that... just blathering at this point... bye
 
Yash, has any thought been given to installing the cfx_pdf (cfxpdf generator) custom tag jacksleight mentioned? I could also use this feature, and would gladly help pay for it if it can be installed.
 
I would love to buy this component for you guys but its not my decision that matters, it the collective decision of our management.

We get alot of requests for buying new components and installing them on the servers. Our policy however has always been (ever since we launched more than a year ago), we won't install custom components and would only buy and provide components to our customers that are popularly available in shared environments. We will provide components that windows hosting companies provide to their customers on a popular basis. One obvious reason is security. We do not want to install components from little know companies. Secondly, it isn't economical for us. This component you are suggesting would cost us $600/server. And the overall use to our customers would be very very limited, only to a small section of our cf customers. And our CF customers constitute a small section of our web base. And when you spend money on components that would cost you in excess of 2 or 3K in the long term, you'd like it to attract new customers which this component would unforunately not do.

So unforunately, I'd have to turn this down. We do install components based on requests, but the number of requests have to be significant (like in the case of ASPJpeg). someone did mention a while ago that there was plenty of open source code for generation of PDF files but maybe not in CF
 
Yash said:
So unforunately, I'd have to turn this down. We do install components based on requests, but the number of requests have to be significant (like in the case of ASPJpeg). someone did mention a while ago that there was plenty of open source code for generation of PDF files but maybe not in CF
Ah well, 'twas a valiant effort but nobody can slight you folks for keeping track of the bottom line!

Oh, one thing that I will add to this thread - at the WorldWide Macromedia User's Group meeting the ColdFusion presentaion included some sneaks at new functions ... one of which included the following:

<cfdoccument type="PDF">
... Anything included within the tag is dynamically generated as a PDF document and sent to the browser.
</cfdocument>

So we just have to be patient as Blackstone (the new CFMX) *should* have the feature.
 
it will be a great deal for you if you bundle all cfx component in coldfusion hosting.

personally i like your reseller account very much.

these component will make you the best coldfusion hosting company with your reseller account :)

ColdFusion MX Components
--------------------------
CFX PayFlowPro
CFX Spell
CFX Zip
CFX Image
CFX ImageInfo
CFX ImageInfoSE
CFX GifGD
CFX Make Tree
CFX Raw Socket
 
Back
Top