i am creating string builder html table and now i want to print same table for multiple times in pdf document. here my code sample
StringBuilder sb = new StringBuilder();
sb.Append("");
");
| " + (Reg) + " | |
| " + (name) + " | |
| " + (rank) + " | |
| " + (Aadhar) + " |
StringReader sr = new StringReader(sb.ToString());
string path = "C:\\Users\\Archit\\Desktop\\test.pdf";
StringWriter sw = new StringWriter();
var output = new FileStream(path, FileMode.Create);
iTextSharp.text.Document pdfDoc = new iTextSharp.text.Document(PageSize.A4, 10F, 10F, 10F, 0F);
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
iTextSharp.text.pdf.PdfWriter.GetInstance(pdfDoc, output);
pdfDoc.Open();
htmlparser.Parse(sr);
pdfDoc.Close();
how to print this table multiple times in pdf document.?

Chandan PrasadPosted Sep 4, 2018, 11:32 PM