Below is the html content :
string headerData= "<table style='width: 100%;'><tbody><tr><td style='width: 50%; border: 0.1px solid #000; backgroundcolor:#f2f2f2; color: #000; height: 22px;font-weight:bold;text-align:right'>Territory: </td><td>USA</td></tr></tbody></table>"
Now i want to export pdf using itextsharp. in which i want to repeat header in every page so i am using "OnStartPage" event from "PdfPageEventHelper". I can write simple text (like "hello Word") or image but not able render html text.
PdfPTable table = new PdfPTable(2);
PdfPCell cellHeaderSection = new PdfPCell(new Phrase(headerData));
table.AddCell(cellHeaderSection);
table.WriteSelectedRows(0, -1, document.LeftMargin, document.PageSize.Height - 36, writer.DirectContent);
But unfortunately it showing html format text only like below image