Free Support Forum - aspose.com

Preserving page number hyperlinks

We have a process that slices up PDF documents into individual PDF pages. We use the code below to do that:



Page pdfPage = pages[pageIndex];

Document pagePDF = new Document();
pagePDF.Pages.Add(pdfPage);

MemoryStream pageStream = new MemoryStream();
pagePDF.Save(pageStream);

We are finding however that any hyperlinks in the copied PDF page are being reset to 1. Which is understandable as the PDF document now only has a single page in it.

Hyperlink example:
file:///#12

These are being reset to:
file:///#1

Is there a way to disable this check / optimisation? We would like to maintain the page number hyperlinks even through the document only has a single page in it.

Thanks

Neil

Hi Neil,


Thanks for your inquiry. Can you please share a sample PDF document here? So we will test it at our end and will provide you further information.

Sorry for the inconvenience faced.

Best Regards,