We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Creating Toc Page that has links to other pdf page


Our requirement is following…

1. Merge couple of existing PDF documents.
2. Prepare first page . That acts as a TOC having link to first page of each pdf document merged.

First requirement is satisfied by using “PdfFileEditor” and merging the docs.

For second requirement. I can generate an XML that can be converted to PDF. I can get the number of pages. So i know Links should point to what all page numbers.

My only issue is that how to specify link to a page in same pdf document in XML

following link.

uses texts with ID. I can’t do that since … except the first page … everything is already converted in pdf.

We already have brought licenses for Aspose.Total.\


Hi Mohit,

Have you tried using LinkPageNumber property to link to a particular page in a PDF document?

Moreover, as you’re using Aspose.Pdf to create this TOC in the first page, so I would move this thread to the related forum and my colleague would be able to further help you out on this.


Hi Shahzad,

I have tried setting the linktype to local and LinkPageNumber Property but it didn’t worked, and i am not sure that I should use CreateLocalLink method or not since I will not be able to format it properly.

Mohit Thakral

Hello Mohit,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for considering Aspose.

When generating a PDF document using Aspose.Pdf for .NET, if you need to create links towards the pages with in the same document, you need to provide the reference of Text paragraphs. In your case, as you're using Aspose.Pdf.Kit to merge the documents, you need to use Aspose.Pdf.Kit to accomplish your requirement.

Hi ,

Can you add a text paragraph to already existing Pdf dcouments page, with segment id. using aspose.pdf.kit. and then prepare a toc pointing to those empy text paragraphs.

Mohit Thakral

Hello Mohit,

I'm afraid you cannot add a text segments to an existing PDF document while assigning any particular ID to it.

For your requirement of generating a TOC for existing PDF document, you may try using the CreateLocalLink method of PdfContentEditor class in Aspose.Pdf.Kit.