I'm currently trying to extract data from the outlines of a pdf.
OK.
Have you read the PDF specification to understand how Outlines are constructed in a PDF? If not, you need to start there.
I want to do this when I'm splitting my pdf document into pages. In fact my aim to produce a XML file, which give me the "tag" of each outline entry and the page number of the link.
OK, however you need to consider that bookmarks may not be associated with pages - they can do MANY things OTHER than "go to page"...
I use a recursive function in order to deal with each 'kids' of all outline entry.
Good...
I use the getRootOutline() method on my PdfContentByte during my split action. But, I've got 2 problems:
- how can I get the label of the outline entry? (getTitle gives a NullPointerException)
You need to use the low level PDF object APIs to do this...
- how can I obtain the page number of the link? (getPdfDestination and then, I don't see which method could give me the page reference)
Again, you need to use the low level API's. AND, more importantly, as noted above, not all bookmarks link to pages.
Leonard -- --------------------------------------------------------------------------- Leonard Rosenthol <mailto:[EMAIL PROTECTED]> Chief Technical Officer <http://www.pdfsages.com> PDF Sages, Inc. 215-629-3700 (voice) 215-629-0789 (fax)
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
