Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8944433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:01:10+00:00 2026-06-15T12:01:10+00:00

I am using VFR reader to display my pdf’s. I need to extract the

  • 0

I am using VFR reader to display my pdf’s. I need to extract the Table of Contents on a button click and display it in a tableview then it should lead to the respective pages while tapping on each.I googled for this and got these links

  1. Create a table of contents from a pdf file
  2. http://mobile.tutsplus.com/tutorials/iphone/ios-sdk-adding-a-table-of-contents-to-an-ipad-reader/

And i came to know that, to get TOC we must use “CGPDFDocumentGetCatalog(pdf doc)”. But in my reader that “CGPDFDocumentGetCatalog(pdf doc)” is not at all getting called. Now how can i extract my TOC from my pdf file? Kindly help me out of this. I am struggling on this for a week. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T12:01:12+00:00Added an answer on June 15, 2026 at 12:01 pm

    Unfortunately I think the two answers you refer to point to different implementation strategies, which are both possibly valid but are different.

    The first question is what the PDF files you have and want to show in your app look like. There is no such thing as a predefined TOC object in a PDF file, there are simply different ways to emulate this. The two most common ways are:

    A) Bookmarks, which are a way to add little pieces of text to a structured tree, where each piece of text points to a specific location in the PDF file. These bookmarks can be added in the design application or later (there are specific tools to do so) and they can implement whatever structure.

    B) Your PDF file might contain something that looks like a classic TOC from a book, which is basically just text on the opening pages, optionally with hyperlinks to specific locations in the book.

    The second link you refer to shows how to create user interface where you can show the TOC in. The remaining question then is to figure out what items you want to display in the TOC window. In this second link you point to, the solution presented is to provide hard-coded items specific to one specific book. Of course this approach is not very useful when you want to display just any book.

    So the question you are left with is how to figure out what items to display and where they link to.

    If you consider my possibility A) above: a PDF file with bookmarks, the answer could be relatively simple. Answer 1 you point to explains how to look at the different structures inside a PDF file – bookmarks are simply such a structure (Defined in section 12.3 of the PDF specification: http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf)

    This means you could use the techniques shown there to walk the different objects in the PDF file, and find each bookmark. The bookmark will give you the text to display and the actual location in the PDF file that text should jump to when clicked.

    If you consider my possibility B) above: a PDF file without bookmarks but a classic TOC, this will be much harder to solve. Such table of contents are simply text on one or more pages, optionally with hyperlinks. Of course you could try to find all text on these pages (if you can figure out on which page the TOC starts and ends), but you’d then also have to figure out where that item links to. If there are no hyperlinks involved, that would be a daunting task.

    So your first question should be how generic you want to solve this problem. Do you know which PDF files you’ll want to display? Can you devise a TOC for these files yourself (as in your solution 2)? If not, can you be sure all PDF files contain bookmarks? The answer to those questions will largely determine the rest of your strategy…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using http://www.vfr.org/ , pdf viewer, and I try to add a button
I am using pdfReader from here: https://github.com/vfr/Reader to show pdfs. It is basically a
Using a populated Table Type as the source for a TSQL-Merge. I want to
Using Microsoft SQL Server 2005, is there any way to see when a table
using phpPgAdmin, I've tried to create a table in my database. But am getting
Using a form I am adding some basic fields to my table. I also
Using MATLAB, you have to start with a uniform distribution between (0,1). You need
Using Scrapy I'd like to parse a webpage containing a very unsemantic table. What
Using PHP and MySQL, I want to query a table of postings my users
Using C#, I want to format a decimal to only display two decimal places

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.