I am converting html text to pdf using ITextSharf, my html text contains above 2000 lines with table. but in generated pdf some of the tr tag in end of the html table is missing. and repeating from first tr tag in table.
for example in my html file have 2250 tr tag in html table means , only first 810 tr tag value getting displyed and again displayed from first tr tag in generated pdf.
my code is here..
pdfConverter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4;
pdfConverter.PdfDocumentOptions.PdfCompressionLevel = PdfCompressionLevel.Normal;
pdfConverter.PdfDocumentOptions.ShowHeader = false;
pdfConverter.PdfDocumentOptions.ShowFooter = false;
pdfConverter.PdfDocumentOptions.LeftMargin = 10;
pdfConverter.PdfDocumentOptions.RightMargin = 10;
pdfConverter.PdfDocumentOptions.TopMargin = 16;
pdfConverter.PdfDocumentOptions.BottomMargin = 30;
pdfConverter.PdfDocumentOptions.GenerateSelectablePdf = true;
pdfConverter.PdfDocumentOptions.ShowHeader = false;
pdfConverter.AvoidTextBreak = true;
pdfConverter.PdfFooterOptions.FooterTextColor = System.Drawing.Color.Blue;
pdfConverter.PdfFooterOptions.DrawFooterLine = false;
pdfConverter.PdfFooterOptions.PageNumberText = "Page";
pdfConverter.PdfFooterOptions.ShowPageNumber = true;
strFileNamePDF = "AdvancedSearch" + "_" + DateTime.Now.ToString("MM/dd/yyyy").Replace("/", "-") + "_" + DateTime.Now.ToString("hh:mm:ss.fff tt").Replace(":", "-");
ObjPatSrch.CreatedDate = DateTime.Now;
strPath = Server.MapPath("~/DocumentsManagement/ScannedCopies/Advanced Search/" + strFileNamePDF + ".pdf");
sTxt = tempText.Value;
pdfConverter.SavePdfFromHtmlStringToFileWithTempFile(sTxt, strPath);
in that code sTxt is my Html text.
pls help me anyone know the solution for this.
Loading

Rahul BansalRank #142 · 15.9K reputationPosted Feb 25, 2015, 9:16 PM EST
http://www.c-sharpcorner.com/UploadFile/a20beb/how-to-design-the-runtime-generated-pdf-via-html-code/
petchiammal M5 reputationPosted Feb 26, 2015, 7:46 PM EST
Rahul BansalRank #142 · 15.9K reputationPosted Feb 26, 2015, 8:04 PM EST
Richard Porter34 reputationPosted Mar 4, 2015, 10:47 PM EST
The article's code uses a .NET component for Word documents.
petchiammal M5 reputationPosted Mar 7, 2015, 2:03 AM EST
Thanks for your reply , here with i attached my html string, you find any issue in my code please let me know.