We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Bold characters not supported

Hi, I’m using Aspose.Pdf 9.1. I have the following code below but when I export to PDF the bold characters do not appear. Is there a way to support multiple fonts names or another solution to getting this to work with still using “Arial Unicode MS”.

I need to use Arial Uniode MS to support for Chinese characters and still support bold/italics.

var htmlString = “

<span style=“font-size:18px;”>NONBOLD BOLD
”;
var text = new Text(htmlString);
text.IsHtmlTagSupported = true;
text.IsHtml5Supported = true;
text.TextInfo.FontName = “Arial Unicode MS”;
text.IfHtmlTagSupportedOverwriteHtmlFontNames = true;
document.Sections[0].Paragraphs.Add(text);
document.SetUnicode();

Hi Andres,


Thanks for your inquiry. Please use new DOM approach for converting HTML to PDF document, sample output is enclosed. It will help you to accomplish the requirements.

Convert HTML to PDF (DOM approach).

Please feel free to contact us for any further assistance.

Best Regards,

Can this be done with Aspose.Pdf.Generator? I have to pass an html string as a parameter and I cannot do this with Aspose.Pdf.Document.

Hi Andres,


Thanks for your inquiry. 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.

Moreover, currently Aspose.Pdf.Document currently does not support HTML string. 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.
(3)

Hi Andres,


Thanks for your patience. As stated above PDFNEWNET-35804 is 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,

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan