Hi Amit,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thank you for considering Aspose.Pdf.
Please see the following sample code
regarding how to add HTML tags in a Table Cell using Aspose.Pdf for .NET.
Aspose.Pdf.Generator.Pdf pdf = new
Aspose.Pdf.Generator.Pdf();
Aspose.Pdf.Generator.Section sec1 = pdf.Sections.Add();
Aspose.Pdf.Generator.Table tblDocData = new
Aspose.Pdf.Generator.Table();
tblDocData.DefaultCellTextInfo.FontName
= "Arial";
tblDocData.DefaultCellBorder
= new Aspose.Pdf.Generator.BorderInfo((int)Aspose.Pdf.Generator.BorderSide.All, 0.1F);
tblDocData.ColumnWidths
= ("150 250");
DataTable dtDocuments = new DataTable();
dtDocuments.Columns.Add("1", System.Type.GetType("System.String"));
dtDocuments.Columns.Add("2", System.Type.GetType("System.String"));
for (int row = 0; row <= 10; row++)
{
DataRow
dr = dtDocuments.NewRow();
dr[0] = "Status Testing
" + row.ToString();
dr[1] = "Document
" + row.ToString();
dtDocuments.Rows.Add(dr);
}
dtDocuments.AcceptChanges();
Aspose.Pdf.Generator.Row rDocHeader = tblDocData.Rows.Add();
Aspose.Pdf.Generator.Cell c1header = rDocHeader.Cells.Add("Status");
Aspose.Pdf.Generator.Cell c2header = rDocHeader.Cells.Add("Document Name");
int i;
for (i = 0; i <=
dtDocuments.Rows.Count - 1; i++)
{
Aspose.Pdf.Generator.Row r11 = tblDocData.Rows.Add();
int j;
for (j = 0;
j <= dtDocuments.Columns.Count - 1; j++)
{
Aspose.Pdf.Generator.Cell clbl = r11.Cells.Add();
string
s = (dtDocuments.Rows[i][j]).ToString();
Aspose.Pdf.Generator.Text text1 = new Text(s);
text1.IsHtmlTagSupported = true;
clbl.Paragraphs.Add(text1);
}
}
sec1.Paragraphs.Add(tblDocData);
pdf.Save(@"d:\ap data\Table_HTML_Formating.pdf");
Please
feel free to contact support in case you need any further assistance.
Thank
You & Best Regards,