Dave, cfsearching(http://cfsearching.blogspot.com/search/label/iText) haves a wonderful library with iText and CF integration(using javaloader) integration. I'll recommend you to look that.
Cheers Marco Antonio On Mon, Apr 14, 2008 at 5:54 PM, Dave Phillips < [EMAIL PROTECTED]> wrote: > Hi, > > I'm attempting to use the iText libs in ColdFusion and want to write my > HTML to a PDF this way (I am unable to use CFDOCUMENT on my Linux > installation due to a bug). I can create a simple PDF directly with the > iText libs with no problem. However, when I output HTML to the itext lib, I > see the HTML, not the nicely formatted tables I have created. Is there a > simple fix for this? I have created a cf_pdfdocument custom tag. Here is > my code (my HTML is in thisTag.generatedContent - the content between my > cf_pdfdocument tags): > > <cfif thisTag.executionMode EQ "end"> > <cfscript> > // create a 'Document' object > oDocument = createObject("java", "com.lowagie.text.Document"); > oDocument.init(); > // get an outputstream for the PDF Writer > oFileIO = CreateObject("java", "java.io.FileOutputStream"); > // call the constructor, pass the location where you want > // the pdf to be created > oFileIO.init("mypdf.pdf"); > // get a PDF Writer var > oWriter = CreateObject("java", "com.lowagie.text.pdf.PdfWriter"); > // call the static 'getInstance' factory method > oWriter.getInstance(oDocument, oFileIO); > // open the document > oDocument.open(); > // create a new paragraph > oParagraph = CreateObject("java", "com.lowagie.text.Paragraph"); > oParagraph.init(thisTag.GeneratedContent); > // add the paragraph > oDocument.add(oParagraph); > // close the document (PDF Writer is listening and will > automatically > // create the PDF for us > oDocument.close(); > </cfscript> > </cfif> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303362 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4