Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am trying to add a pdfptable to a itextsharp document. Since the data is large it throws the error "Object reference not set to an instance of an Object".
However it works fine with small data.
please provide a solution for the issue.

Please find the stack trace below:
at iTextSharp.text.pdf.PdfPTable.RowSpanAbove(Int32 currRow, Int32 currCol)
at iTextSharp.text.pdf.PdfPTable.GetRowHeight(Int32 idx, Boolean firsttime)
at iTextSharp.text.pdf.PdfPTable.GetRowHeight(Int32 idx)
at iTextSharp.text.pdf.ColumnText.GoComposite(Boolean simulate)
at iTextSharp.text.pdf.ColumnText.Go(Boolean simulate)
at iTextSharp.text.pdf.PdfPCell.GetMaxHeight()
at iTextSharp.text.pdf.PdfPRow.CalculateHeights()
at iTextSharp.text.pdf.PdfPRow.SplitRow(PdfPTable table, Int32 rowIndex, Single new_height)
at iTextSharp.text.pdf.ColumnText.GoComposite(Boolean simulate)
at iTextSharp.text.pdf.ColumnText.Go(Boolean simulate)
at iTextSharp.text.pdf.ColumnText.Go()
at iTextSharp.text.pdf.PdfDocument.AddPTable(PdfPTable ptable)
at iTextSharp.text.pdf.PdfDocument.Add(IElement element)
at iTextSharp.text.Document.Add(IElement element)
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900