Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
505
Export options for an exported PDF Document
posted

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

  • CompressContent = True/False -> if True -> Type of compression e.g. Adler32 or CRC32 or ...
  • EncryptFile = True/False

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);

Parents Reply Children