This free consulting project uses Aspose.PDF to enable you to create TOC in exisiting PDF document by extracting first line/phrase of each page. It also showcases a functionality to extract lengthy content pages and create a separate PDF document from them. For example, if a Chapter has title "Chapter 1" and it expands over more than one page of the PDF, this utility will extract all pages containing "Chapter 1" title and create a new PDF file from them.
Below is the main screen of the application which is annotated as well to describe functionality of each control:
Set License File: You must have a valid license file before using the application. In case you do not have one, you can apply for a 30-days free temporary license to use and evaluate the API without any restriction.
Select a PDF: The application uses a sample PDF document (sample.pdf) which is also available in the project but, you can use any PDF document having similar structure.
Extract First Phrase/Word of each Page: This will extract very first phrase/word/title of every page inside selected PDF and list it in the below ListBox. e.g. Below ScreenShot:
Create TOC in PDF with Unique Titles: This will create/add TOC in selected PDF document containing unique titles and hyperlinks pointing to the corresponding pages. Below is a screenshot of sample output PDF document:
Create separate PDF for long titles and Create TOC for Rest: This option will extract all chapters expanding over more than one page and create separate PDF for them. Also, it will create TOC for the remaining chapters in selected PDF.
If you have any questions about Aspose APIs, please feel free to post your query in Aspose file format APIs Forums.
Also, you can keep in touch with the latest developments in file format APIs offered by Aspose at our Blog.
create a project that does Epub to PDF, Preview PDF converter: github.com/aspose-free-consulting/projects/issues/16#issuecomment-564834044