Hello,
I’m using v18.3.0 of the C# Aspose.Pdf library to convert HTML documents to PDFs.
In my HTML, I have an anchor tag (< a >) with an href to an external website. After PDF conversion, the anchor is displayed, but is not clickable.
Here is the sample code I use:
var options = new HtmlLoadOptions(".\\");
Document = new Document(stream, options);
Document.Save(outputStream, SaveFormat.Pdf);
I’ve tried doing a similar process with the Aspose.Html library, which has the same problem.
I can use Aspose.Word to convert from HTML->Word->PDF and then the link works expected (I can click on it to open the site in a browser window), but that seems like extra unnecessary steps.
I’ve attached the sample html file in a zip
SampleWithAnchorLink.zip (108.1 KB)
And here is the generated PDF:
SampleOutput.pdf (107.6 KB)
Any help would be appreciated.