Textinfo style is lost when using BOLD or ITALIC tags in the content

I am passing simple html to a cell in a pdf table and applying the RepTextInfo style listed below. This works for normal text in the html, however if i use or , the text font is change. It looks like Times New Roman.

I have also attached a sample of the output pdf text.

TextInfo contentSubHeaderTextInfo = new TextInfo();

contentSubHeaderTextInfo.FontName = "Arial";

contentSubHeaderTextInfo.FontSize = 8;

contentSubHeaderTextInfo.IsTrueTypeFontBold = true;

contentSubHeaderTextInfo.LineSpacing = 2;

TextInfo RepTextInfo = new TextInfo();

RepTextInfo.FontName = "Arial";

RepTextInfo.FontSize = 8;

RepTextInfo.LineSpacing = 2;

Aspose.Pdf.Table contentHeaderTable = new Aspose.Pdf.Table();

contentHeaderTable.ColumnWidths = "385";

contentHeaderTable.Margin.Top = 10;

Aspose.Pdf.Row contentHeaderRow = contentHeaderTable.Rows.Add();

contentHeaderRow.DefaultCellTextInfo = contentSubHeaderTextInfo;

Aspose.Pdf.Row contentRow = contentHeaderTable.Rows.Add();

contentRow.DefaultCellTextInfo = RepTextInfo;

Aspose.Pdf.Cell contentHeaderCell = contentHeaderRow.Cells.Add(title, contentSubHeaderTextInfo);

Text contentText = new Text(areaContent, RepTextInfo);

contentText.IsHtmlTagSupported = true;

Aspose.Pdf.Cell contentCell = contentRow.Cells.Add();

contentCell.Padding.Bottom = 10;

contentCell.Paragraphs.Add(contentText);

contentHeaderRow.Border = new BorderInfo((int)(BorderSide.Top | BorderSide.Bottom), 1.0f, new Color("black"));

paragraphs.Add(contentHeaderTable);

FYI: We are using aspose.pdf 4.1.2

Hello Jonathan,

Sorry for replying you late.

I have tested the scenario and I’m able to reproduce the same problem. I have logged it in our issue tracking system as PDFNET-14597. We will investigate this issue in details and will keep you updated on the status of a correction.

We apologize for your inconvenience.

Do you have an ETA for a fix to this problem?

Hi,

Currently we’ve looking into the details of this problem and at the moment, we’re not certain about the dates regarding its resolution. As soon as we’ve some definite information, we will be pleased to update you with the status of correction.

Please spare us little time and we will get back to you, shortly. Your patience and comprehension is greatly appreciated in this regard.

We apologize for your inconvenience.

Can i get an update on this? It is a production issue in our environment and has been open for a while.

Thanks

Jon

Hello Jon,

Our development team is still working over this activity and once we've some definite information regarding its resolution, we would be pleased to update you with the status of correction.

Please accept our humble apologies and be patient. Thanks for your comprehension.

We're really sorry for your inconvenience.

Can i get an update on this?

Thanks

Jon

Hi,

As per our initial estimates, we hope to get these issues resolved in 2 weeks. Please spare us little time and be patient. We regret for your inconvenience.

Today is 3 weeks from the date that this was reported. You estimated 2.



Any idea when this can be expected. I have internal stakeholders wanting an update as this is a production issue.



Thanks



Jon

Hello Jon,

Thanks for your patience.

I'm pleased to inform you that the issue reported earlier has been resolved in the HotFix shared over 227514. Please try using it and in case you still face any issue or you've any further query, please feel free to contact.

Thanks for your comprehension.

This hotfix didn’t work for me as my output now has #$NL everywhere a html tag seems to be.

Hi,

Can you please share some sample HTML contents for which you're facing the issues, so that we can test the scenario at our end.

We apologize for your inconvenience.

see forum item 223382

<A href="https://forum.aspose.com/t/117353</A></P>

Hi,

I've tested the scenario and I'm unable to reproduce the problem. I've used the following information for TextInfo object and the information is properly being applied to the contents inside table. I'm also unable to notice the #$NL issue.

[C#]

Aspose.Pdf.TextInfo RepTextInfo = new Aspose.Pdf.TextInfo();
RepTextInfo.FontName ="Arial";
RepTextInfo.FontSize = 8;
RepTextInfo.LineSpacing = 2;

Can you please take a look over the attached resultant PDF that I've generated.

We're really sorry for your inconvenience.

Have you tried doing this with the hotfix listed on?

see forum item 223382

<A href="https://forum.aspose.com/t/117353</FONT></A></P></DIV>

Hi,

Thanks for your patience.

I've investigated the issue in details and have figured out the reason of #$NL being displayed when converting HTML contents into PDF format. I've used the same HotFix as shared over 226952 and have observed that, if we read the HTML file and convert it to PDF format using InLineHTML technique, the #$NL characters are being displayed. Whereas, if we've placed the HTML contents inside the String object and then create a Text object while passing the same string as an argument, and then adding the Text to the paragraphs collection of PDF section, the PDF is being displayed correctly.

In my previous post, I've created a PDF document using the approach as shared over 226974.

I will further discuss this issue with development team and will update you with the appropriate status.

We're really sorry for your inconvenience.

Hi,

Thanks for your patience.

The issue PDFNET-14597 reported earlier has been resolved in the latest HotFix of Aspose.Pdf for .NET shared over this link. Please try using it and in case you face any problem or you have any further query, please feel free to contact.

Sorry for the delay and inconvenience.

The issues you have found earlier (filed as 14597) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.