Another question for the iText experts: Making a copy of a PDF document (I'm actually looping through a list of documents, and putting them all together), after setting up my reader, and writer, I'm trying to add a bookmark for each page (for instance). I'm getting the bookmarks, but they don't link to any pages--not even the first page. I'm getting an Object Instantiation Exception on the copy.add() line, the Outline element is being added to the document. It just doesn't work.
page=copy.getImportedPage(reader,javacast("int",p)); copy.addPage(page); newdest = dest.init(dest.FITH); copy.add(createobject("java","com.lowagie.text.pdf.PdfOutline").init(copy.getRootOutline(), newdest, "page " & i )); I've been looking through the iText API, but can't come up with what objects I really need to be getting/setting/passing to make this work. The example on the iText Tutorials site uses a template to bookmark an object on a page. Is there a way to just reference a page? I'm seeing wondering how I can get a PdfIndirectReference for the most recent pdfImportedPage. If I can do that then I can set the PdfOutline to that indirectReference. Any thoughts? Cheers, 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:251699 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4