Please add <pre> tag support ASAP

Since using IsHtmlTagSupported strips text formatting, it is imperative that the

 tag is added to supported HTML tags so that basic text formatting can be preserved.
The lack of this tag prevents basic and common usage of this tool, and prevents us from using it for the only reason we purchased this library in the first place.

Hi Charles,


Thanks for contacting support.

I have tested the scenario using Aspose.Pdf for .NET 9.4.0 where I have used the following HTML and as per my observations, the
 tag is properly being honored during conversion. For your reference, I have attached the resultant PDF generated over my end.

Can you please share the HTML you are using so that we can test the scenario at our end. We are sorry for your inconvenience.

[C#]

var htmloptions = new HtmlLoadOptions();<o:p></o:p>

htmloptions.UseNewConversionEngine = true;

Aspose.Pdf.Document pdf = new Aspose.Pdf.Document(@"C:\pdftest\Test (1)\Test.html", htmloptions);

pdf.Save(@"C:\pdftest\Test (1)\Test_conversion.pdf");

I am not doing a direct html to pdf conversion, I am building the PDF from scratch with generator and using the HTML tags option. PRE does not work, and it is not listing in supported tags

http://www.aspose.com/docs/display/pdfnet/HTML+Tags+in+Text

I have found a workaround that I like better using a TextFragmentAbsorber (though it has its own bugs regarding text color) but this has its limitations so supporting the full scope of html tags should be included to make the tool much more flexible.

Hi Charles,


Thank you for your feedback. I am afraid Aspose.Pdf.Generator is old generator and it is obsolete now. We are making changes and improvements in new generator Aspose.Pdf.Document (DOM approach). It is more improved and efficient. Currently DOM approach supports HTML file to PDF conversion and does not support adding HTML string into PDF document. We have already logged feature request as PDFNEWNET-35804 for the same in new generator. We will notify you as soon as it is resolved.

We are sorry for the inconvenience caused.

Best Regards,

The issues you have found earlier (filed as PDFNEWNET-35804) have been fixed in Aspose.Pdf for .NET 9.5.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi Charles,


Thanks for your patience. As stated above PDFNEWNET-35804 is also resolved and now you can add HTML string in new/existing document using new DOM approach. Please check following documentation link for the purpose. It will help you to accomplish your requirements.


Please feel free to contact us for any further assistance.

Best Regards,