Hi Vivek,
Thank you for considering Aspose.Pdf.
Yes, Aspose.Pdf for .NET does support external style sheets while conversion from HTML to PDF.
To figure out the issue, I would request you to share your template HTML and CSS files with us. We will check it and get back to you soon.
Sorry for the inconvenience,
Hi,
Hi Vivek,
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-34318. We will investigate this
issue in details and will keep you updated on the status of a correction.
Hi,
Hi Vivek,
Is this issue resolved in latest release?
Hi Vivek,
Thanks for your inquiry. I have tested the HTML to PDF scenario using your sample HTML files with new DOM approach of HTML to PDF conversion and unable to notice any external CSS formatting issue. Please note while converting HTML to PDF, you may pass basepath of external resources(CSS/Images/Fonts etc) to HtmlLoadOptions object as following.
Please download the latest version of Aspose.Pdf for .NET, try the following code snippet and share the results. Hopefully it will help you to resolve the issue.
HtmlLoadOptions options = new HtmlLoadOptions(@"D:\Downloads\Aspose+HTML\Aspose HTML\");
Document doc = new Document(@"D:\Downloads\Aspose+HTML\Aspose HTML\terminator.htm", options);
doc.Save(myDir+"htmltopdf.pdf");
We are sorry for the inconvenience.
Best Regards,