Hi,
we're using the DocumentExporter to get an pdf export from our Grid by using the code below.
Now we combine pdf files by PDFSharp (cause infragistics doesn't support something like that). We already combined more than 10000 pdf files but each time we try to combine a pdf generated by the DocumentExporter the combining fails. It says the compression of the file is different then the standard allows. There is no chance to handle it if the exporter publishes a PDF file. Even if the file is completely empty! So the error is the saving of the pdf file it self. It should be full v.1.4 compatible but it isnt.
Current ugly workaround is to export the grid to excel and let excel save the pdf file -> it works.
But our customer want a more handy solution.
Except the ImageCompression there is no setting we can change. So question is:
How can we set some changes for the exported pdf like
Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridDocumentExporter pdfExporter = new Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridDocumentExporter();
pdfExporter.ExportStarted += ultraGridPDFDocumentExporter1_ExportStarted;
pdfExporter.ExportEnded += ultraGridPDFDocumentExporter1_ExportEnded;
pdfExporter.Margins = new PageMargins(10, 10, 10, 10);
pdfExporter.TargetPaperSize = PageSizes.A4;
pdfExporter.TargetPaperOrientation = PageOrientation.Landscape;
pdfExporter.AutoSize = Infragistics.Win.UltraWinGrid.DocumentExport.AutoSize.None;
pdfExporter.ImageCompressorType = Infragistics.Win.UltraWinGrid.DocumentExport.ImageCompressorType.JPEG;
// Export the grid into the report. This will automatically create a new
ISection section = pdfExporter.Export(this.GridToExport, report);
// Publish the report.
report.Publish(path, FileFormat.PDF);
The Infragistics PDF engine uses v1.3 of the PDF specification. So it may not be compatible with 1.4. But we did recently make a change to how we export fonts. What version of the Infragistics assemblies are you using?
Update:
Found differences in the pdf properties if we export the report direct as pdf and if we go the way by exporting it to excel first and let excel save it as pdf.
The embedded fontType will be different saved. (?)
Direct saved pdf:
PDF Saved by Excel