Aspose HTMLToPDF Issue

Hello Aspose Team,
Greeting..!

This related with HTMLToPDF conversion. Let me explain the use case.

I have below HTML with me and trying to put everything into PDF. In my case, PDF has been generated successfully however *some* format is missing. My fonts are properly converted with required size in PDF however background colour is not rendered in PDF. Also i have used underline below fonts that is also missing in generated pdf. Ultimately font size is correct, font colour is correct but background color of HTML page and Underline of fonts are missing. I am not sure what other formats are missing but this is what i have checked. Please find attached generated pdf.

At Code level I am using

Aspose.Pdf.Generator.Pdf pdfDocument = new Aspose.Pdf.Generator.Pdf();
pdfDocument.BindHTML(HTMLtext);

Could you please guide us what is missing here so that entire HTML format is not in PDF generated?


My

Testung One Two Three - Colurful

 

Hi Testing 123<FONT

size=3>



Hi Ashpak,


Thanks for your inquiry. It is recommended to use new DOM approach for HTML to PDF conversion. I have tested the scenario with following code and noticed that underlines are rendering fine but color is not being honored in resultant PDF document, so logged a ticket PDFNEWNET-39759 in our issue tracking system for further investigation and resolution. We will notify you as soon as it is resolved.

Aspose.Pdf.HtmlLoadOptions
options = new HtmlLoadOptions();<o:p></o:p>

// Create document object

Aspose.Pdf.Document document = new Aspose.Pdf.Document(myDir + "BackgroundColor.html", options);

// Save the resultant PDF document

document.Save(myDir+"HTMLtoPDF.pdf");


We are sorry for the inconvenience caused.

Best Regards,

The issues you found earlier (filed as PDFNET-39759) have been fixed in Aspose.PDF for .NET 23.1.