I've read most of the messages in this forum with regard to TOC generation
as well as looked at the examples in chapter 14 of "IText In Action", but
none of the examples are useful to me for what I am trying to accomplish.
Essentially, I want to read in an input PDF file using IText and generate a
new output PDF file which has a TOC at the beginning. The file I am trying
to read is a textbook that has no TOC nor does it have bookmarks. I ran the
following code segment:
/* chapter13/OutlineActions.java */
PdfReader reader = new PdfReader("outline_actions.pdf");
List list = SimpleBookmark.getBookmark(reader);
SimpleBookmark.exportToXML(list, new
FileOutputStream("outline_actions1.xml"), "ISO8859-1", true);
but the list is null because there are no bookmarks. This snippet does work
well (bookmarks do get generated) for books with TOCs. Any advice, or sample
code would be very very useful. I do own Bruno's book so even directing me
to a page number is fine. I've skimmed thru chapter 13 and read chapter 14.
--
View this message in context:
http://www.nabble.com/TOC-generation---input-PDF-has-no-bookmarks-tp22174210p22174210.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php