Creating Toc Page that has links to other pdf page

Hi,



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.
http://www.aspose.com/documentation/.net-components/aspose.pdf-for-.net/hyperlinks-to-pages-in-the-same-pdf-document.html

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.\

Regards
Mohit


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.

Regards,

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.

Regards
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.

Regards
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.