I searched for a solution for oyu and I found another PDF java library
http://www.pdfbox.org/

This Java program allows to add structured bookmarks to an existing pdf
file. The bookmarks are defined in a separate text file.
http://www.physik.fu-berlin.de/~goerz/programme_en.html#pdfwritebookmarks

How to create bookmarks in a PDF file with Java
http://www.java-tips.org/other-api-tips/itext/how-to-create-bookmarks-in-a-pdf-file-with-java.html

I never used iText but if people are getting into java then I game to
provide solutions.

Has anyone created a jws iText master file yet for coldfusion???

PdfReader reader = new PdfReader("TDA9800_CNV_4.pdf");
java.util.List bm = SimpleBookmark.getBookmark(reader);
SimpleBookmark.exportToXML(bm, new FileOutputStream("c:\\ic.xml"),
"UTF-8", false);
System.out.println(bm.toString());


If you are only passing strings to a CFC I would suggest using jws instead.





On 8/31/06, Kris Jones <[EMAIL PROTECTED]> wrote:
>
> 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:251709
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to