Hello,
I generate lots of pdf's with different set of data. I have an issue generating a pdf with one set of data. The table get not splitted over multiple page and part of the data is missing.
Moreover with the same set of data I get an error ""Invalid index in Cells indexer: 5" when saving the document. I identified the code part causing the problem when saving :
//Format data table
int nbColumns = table2.Rows[1].Cells.Count;
for (int i = 0; i < nbColumns; i++)
{
width = table2.GetMaxColumnWidth(pdfDoc, i);
table2.SetColumnWidth(i, width);
}
PdfDoc.Save(Utils.BuildFilePath(timeSerie, timeSerie.IdDataCategory, Enums.FileFormat.PDF, timeZone, timeSerie.Date, int.MinValue, true));
StackTrace :
" at Aspose.Pdf.Cells.get_Item(Int32 index)\r\n at Aspose.Pdf.Xml.ᖂ.ᖌ(Pdf Ӕ, Section Ⴛ, Table Ֆ, Ӟ Ӷ)\r\n at Aspose.Pdf.Xml.ᖂ.ᖄ(Pdf Ӕ, Section Ⴛ, Table Ֆ, Ӟ Ӷ, Boolean ᎘)\r\n at Aspose.Pdf.Xml.ᕶ.ᕹ(Pdf Ӕ, Section Ⴑ, Ӟ Ӷ)\r\n at Aspose.Pdf.Xml.ڇ.႐(Pdf Ӕ)\r\n at Aspose.Pdf.Xml.ᦈ.ᦍ(ӟ ຬ, Pdf Ӕ)\r\n at Aspose.Pdf.Pdf.Save(String pdfFile)\r\n at ETSOVistaLib.PDFGenerator.BuildPDFFile(TimeZoneInformation timeZone, TimeType timeType, MemoryTimeSerie timeSerie, Int32& timeZoneIndex, Boolean buildGroupHeader) in D:\\VSS\\Projects06\\ETSOVista\\Dev\\ETSOVistaLib\\JobOutputGenerators\\OutputGenerators\\PDFGenerator.cs:line 398"
It will be difficult to post the data set used because it's a set of business objects. Could you maybe give me a hint on the error message ? I think in someway my pdftable is corrupt and it would explain both problems. I included the entire pdf generation function enclosed.
Thanks
Gilles