Get Table of Contents from a PDF

264 views
Skip to first unread message

Ragu

unread,
May 16, 2012, 12:54:13 AM5/16/12
to pdfne...@googlegroups.com
I need to display Table of Contents(TOC) in a seperate view in android.
Does PDFTron supports extracting the TOC ?

Support

unread,
May 16, 2012, 5:10:52 PM5/16/12
to pdfne...@googlegroups.com
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. 

2.       Bookmarks

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

 
3.       Table of Contents

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

 
 
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.
Reply all
Reply to author
Forward
0 new messages