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

Free Support Forum - aspose.com

Convert HTML to PDF using C# .NET | Add Hyperlink to Jump to Bookmarked Place in PDF

Hi team,
I am using Aspose Words trial and converting ODT to HTML and then saving to PDF.
I have table of sections and section heading and I want to convert these section heading to clickable link which should jump to the section details.

For example:
<a href="#sec2">Section 2</a>
<div id="sec2">

How can I do this, with Aspose words using html to PDF?

Looking forward to hearing from you. Thanks


Please see these input HTML and Aspose.Words’ generated output Word (DOCX) and PDF files:

And try running the following code:

Document doc = new Document("E:\\temp\\link to bookmark\\inp.html");
doc.Save("E:\\temp\\link to bookmark\\20.3.docx");
doc.Save("E:\\temp\\link to bookmark\\20.3.pdf");

Hope, this will help in achieving what you are looking for.

1 Like

Thanks, it helped.