Exception when exporting to PDF
Hi,
we're trying to export a ready-prepared report to pdf.
Unfortunately, the export throws an exception.
I've attached the prepared report (saved directly before using the exporter).
The code:
fastReport.SavePrepared(@c:\temp\kaputt.prepared.fpx); // here was the attached file saved
using ( var pdfExport = new FastReport.Export.Pdf.PDFExport() )
{
pdfExport.Compressed = true;
pdfExport.Creator = "ZWODATA " + VersionHolder.AssemblyFileVersion;
pdfExport.CenterWindow = false;
pdfExport.Subject = crd.Zuordnung.Bezeichnung;
pdfExport.ShowProgress = false;
pdfExport.Background = false;
pdfExport.Keywords = reportType + ", " + attrib.DataSource;
pdfExport.Producer = "ZWODATA Report-Engine powered by FastReport";
pdfExport.Title = reportDesign != null ? reportDesign.Bezeichnung : AutomaticFactoryDesignSample;
Trace.WriteLine(sw.Elapsed, "export");
fastReport.Export(pdfExport, resultStream); // here it crashes
}
The exception:
Exception: System.ArgumentOutOfRangeException
bei System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
bei System.ThrowHelper.ThrowArgumentOutOfRangeException()
bei System.Collections.Generic.List`1.set_Item(Int32 index, T value)
bei FastReport.Export.Pdf.PDFExport.PYMwBpEjj(EbcmjbkqKmcYSFB9uHl )
bei FastReport.Export.Pdf.PDFExport.rkm4LAeHl()
bei FastReport.Export.Pdf.PDFExport.Finish()
bei FastReport.Export.ExportBase.Export(Report report, Stream stream)
bei FastReport.Report.Export(ExportBase export, Stream stream)
Maybe you can help.
Thanks
Sascha
we're trying to export a ready-prepared report to pdf.
Unfortunately, the export throws an exception.
I've attached the prepared report (saved directly before using the exporter).
The code:
fastReport.SavePrepared(@c:\temp\kaputt.prepared.fpx); // here was the attached file saved
using ( var pdfExport = new FastReport.Export.Pdf.PDFExport() )
{
pdfExport.Compressed = true;
pdfExport.Creator = "ZWODATA " + VersionHolder.AssemblyFileVersion;
pdfExport.CenterWindow = false;
pdfExport.Subject = crd.Zuordnung.Bezeichnung;
pdfExport.ShowProgress = false;
pdfExport.Background = false;
pdfExport.Keywords = reportType + ", " + attrib.DataSource;
pdfExport.Producer = "ZWODATA Report-Engine powered by FastReport";
pdfExport.Title = reportDesign != null ? reportDesign.Bezeichnung : AutomaticFactoryDesignSample;
Trace.WriteLine(sw.Elapsed, "export");
fastReport.Export(pdfExport, resultStream); // here it crashes
}
The exception:
Exception: System.ArgumentOutOfRangeException
bei System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
bei System.ThrowHelper.ThrowArgumentOutOfRangeException()
bei System.Collections.Generic.List`1.set_Item(Int32 index, T value)
bei FastReport.Export.Pdf.PDFExport.PYMwBpEjj(EbcmjbkqKmcYSFB9uHl )
bei FastReport.Export.Pdf.PDFExport.rkm4LAeHl()
bei FastReport.Export.Pdf.PDFExport.Finish()
bei FastReport.Export.ExportBase.Export(Report report, Stream stream)
bei FastReport.Report.Export(ExportBase export, Stream stream)
Maybe you can help.
Thanks
Sascha
Comments
The fix will be available tomorrow (v 1.2.56).
BTW: The image processing for pdf looks very inefficient: PDF supports back references for the same image when it is used on multiple pages, so the pdf which gets 4MiB now could really fit into ~100KiB.
thanks for the quick reply.
At what time do you usually upload the new versions?
Best regards
Sascha