Problem with HTML to PDF conversion

I have tried to convert HTML to PDF in two different ways without much luck.





Firstly I used pdf.bindhtml(…) and the result was lacking formatting (such as the strong tag).





Then I tried following one of the other samples creating a pdf object, adding a section and adding text to the section with ishtmlTagSupported = true.





In the second case, when I add an unordered list with list items it crashes with an exception at at Aspose.Pdf.Generator.Pdf.Save(Stream stream) caused by:

Could not find a part of the path ‘c:\usr\X11R6\lib\X11\fonts\truetype\msttcorefonts’





My HTML is extremely simple though it is just the body contents rather than a complete HTML document.





Any ideas as with EO.pdf this was simply load and save with no other special attention needed.

Hi Damon,

Thanks for contacting support.

I have tested the scenario using Document Object Model of Aspose.Pdf namespace and as per my observations, I am unable to notice any issue during conversion process. For your reference, I have also attached the PDF document generated at our end.

C#

// load source HTML file
var document = new Document("c:/pdftest/samplehtml.txt", new HtmlLoadOptions());
// save resultant PDF
document.Save(@"C:\pdftest\samplehtml_test.pdf");