BlueDragon Blog
Here you'll find tips and information about making the most of BlueDragon, which offers several compelling implementation alternatives for your CFML applications. This blog was created originally by Charlie Arehart, who was New Atlanta CTO from 2003-2006.,He has since moved on to become an independent consultant but continues to answer comments raised in existing blog entries. BlueDragon continues, and you should look to the newer BlueDragon blog, from New Atlanta president, Vince Bonfanti, for more updated information.

"Creating Free PDFs from Your CF Application" - Applied to BlueDragon

posted Tuesday, 26 April 2005

Some readers may have noticed that Nate Nelson wrote a great article in the July 2004 CFDJ on creating PDFs in CFML using XSL-FO. The great news for BlueDragon developers (on Server JX or the J2EE edition) is that everything in this article applies to BlueDragon as well. 

Just copy the jars into the BlueDragon lib directory (on my machine, it's C:\BlueDragon_Server_JX_62\lib, for instance), and just as Nate says that you need to add the path to the fop.jar to the JVM classpath in the CF admin, you also need to do the same in the BlueDragon admin, and restart.  (The free Server edition has no field for adding JAR classpaths in the Admin.)

There's one minor change from his instructions in the case of BlueDragon: where CFMX uses commas to separate multiple JAR files listed in the classpath, BlueDragon requires semi-colons on Windows or colons on Linux\OS X.

The example he offers will then just work.

Indeed, for someone wanting to test his example code without having to define a database and populate it, I just added the following to the top of generatexml.cfm in place of the CFQUERY:

<cfscript>
getcustomers=querynew ("customerfirstname,customerlastname,customercity,customerstatecode,usstatename");
queryaddrow(getcustomers,1);
querysetcell(getcustomers,"customerfirstname","charles");
querysetcell(getcustomers,"customerlastname","arehart");
querysetcell(getcustomers,"customercity","alpharetta");
querysetcell(getcustomers,"customerstatecode","ga");
querysetcell(getcustomers,"usstatename","georgia");
</cfscript>

And note that in using this code I just called the generatexml.cfm file directly, without using the basicform.cfm he offered. I just wanted to test the bare minimum capability.

Hope that may help others.