I am using Aspose.Pdf 18.11. We have a requirement where we have very large documents with hyperlinks to chapters.
Pdfs are generated module wise and so the linking between hyperlink in module1(pdf1) having target page number of source heading in module2(pdf2) cannot be done. So we maintain the headings(which are target of the hyperlinks) in a List<>. After all modules pdfs are generated we merge them.
After merging we do document.processParagraphs() to get the destination page numbers of the headings(which are source of hyperlink).
Using the hyperlinks created in each module the text is searched in the whole pdf page wise using TextAbsorber. When fragments are identified, the hyperlink of that textFragment, destination page is set from the List<> maintained. This process is time consuming. Also, lot of time Document.processParagraph() is done. Eventually we get Memory exception and the final document is created with some of the hyperlinks directed to the destination page.
As the documents are large and contains major project data we cannot share with you sample code. Please suggest what can be done at your earliest
If you have a sample in which we can create hyperlinks for existing pdfs will also do. We will change the code according to that. But we need a full and final solution which will work for all.