Anjana

Anjana

  • NA
  • 5
  • 6.2k

iTextsharp Error

Mar 5 2014 7:59 AM
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)

Answers (2)