Calling on all you CF-Java-knowledgeable folks out there. I'm trying to follow some of the examples in the iText tutorial, and I've hit a mental wall.
When trying to instance a file output stream, the java example I see looks like this: Document document = new Document(); try { PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("Destinations.pdf")); [blah blah blah...] Obviously, that's not going to fly in a cfscript block. How would you write this in CF? Something like: <cfscript> document = createobject("java", "com.lowagie.text.Document"); finalOutPutFile = "C:\testpdf.pdf"; myPDF = createObject("java","java.io.FileOutputStream").init(finalOutPutFile); fso= createobject("java","com.lowagie.text.pdf.PdfWriter"); try { writer = createobject("java",fso.getInstance(document, myPDF)); [blah blah blah...] </cfscript> Or would it the actual fso be created like: fso = createobject("java","com.lowagie.text.pdf.PdfWriter).getInstance(document, myPDF); What's confusing me is the static PdfWriter.getInstance method. In CF, I thought I had to call an init() method on the class to get back an object, but if there's a static method (not a constructor per se), how would I do this? Forgive this horrid example--I'm sure I've got this all jumbled around. My ultimate goal is to add destinations and outlines (bookmarks) to a new PDF file as it gets created via concatenated PDFs. Thanks, Kris ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251423 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4