I am having problems getting Aspose.Pdf.Generator.Pdf (Version Aspose pdf 8.5) to recognise Text formatting with IsHtmlTagSupported .
I want to show HTML formatted data in a table cell.IsHtmlTagSupported is working , but other text properties stopped working once HTML is applied. Like I want to set textsize to Arial : 8 , but it is always showing larger font.
Tried these code:
Aspose.Pdf.Generator.Text Text1 = new Aspose.Pdf.Generator.Text("Description: " );
Aspose.Pdf.Generator.Segment TextSeg = new Aspose.Pdf.Generator.Segment("
[February 5, 2013]In a February 4, 2013, Updated Urgent Device Field Correction letter submitted by Hospira, the firm notified its customers of additional recommendations to prevent the problem described below from occurring.
");TextSeg.TextInfo.FontName = “Times New Roman”;
TextSeg.TextInfo.FontSize = 8;
TextSeg.TextInfo.IsTrueTypeFontBold = false;
Text1.Segments.Add(TextSeg);
Text1.IsHtmlTagSupported = true;
Aspose.Pdf.Generator.Cell RowCell = ActionRow.Cells.Add();
RowCell.Paragraphs.Add(Text1);
Another Example
string s = “
” + “This is a test for HTML </ support " + " in Text paragraph.” + "Search ";
string s2 = “This is a test for HTML with colored text.”;
Aspose.Pdf.Generator.Text Text1 = new Aspose.Pdf.Generator.Text("Description: " + s + s2);
Aspose.Pdf.Generator.Cell RowCell = ActionRow.Cells.Add();
RowCell.Paragraphs.Add(Text1);
Need your suggestion in this regard.