Get Table of Contents from a PDF

I need to display Table of Contents(TOC) in a seperate view in android.
Does PDFTron supports extracting the TOC ?

Q:

Does PDFNET Android SDK provides support for displaying

  1. Thumbnail view
  2. Table of Contents
  3. Bookmarks

A:

Although the current Android sample project doesn’t show some of these features, it is easy to add them using the functions from PDFNet.jar:

  1. Thumbnail view

You can use pdftron.PDF.PDFDraw() to draw low-res pictures of the pages and display them using a suitable android widgets.

  1. Bookmarks

Our SDK offers functions to handle Bookmarks and there is a sample code at

http://www.pdftron.com/pdfnet/samplecode/BookmarkTest.java

  1. Table of Contents

If you want to generate a TOC from the Bookmarks mentioned above, please have a look at the following links:

https://groups.google.com/forum/?fromgroups#!searchin/pdfnet-sdk/TOC$20bookmark/pdfnet-sdk/iVVzGrZAAqs/wo1rpB9FMpYJ

If you want to generate TOC by analysing existong contents you would need to use pdftron.PDF.TextExtractor and try to identify content based on positioning, style (e.g. font size/style) and other info. This info is not explicitly represented in PDF.

On Tuesday, May 15, 2012 9:54:13 PM UTC-7, Ragu wrote:

I need to display Table of Contents(TOC) in a seperate view in android.
Does PDFTron supports extracting the TOC ?