Anything strange with the PDF generated by FR?

jeromejerome France
edited 9:27PM in FastReport .NET
Hi,
Recenty I had to implement a function that would allow to convert PDF files to image files (TIFF for instance). I've been using Ghostscript to do so. I managed to make it with lots of PDFs, but each time I try to convert a PDF that has been generated by FastReport, I get an AccessViolationException. However I can open the PDF file with Acrobat Reader and I've never had problems!
To generate the PDF file, here is the C# code I use :
Report Rapport = new Report();
// ... doing some stuff with the report ...
if (Rapport.Prepare()) {
        FastReport.Export.Pdf.PDFExport ExportPDF = new FastReport.Export.Pdf.PDFExport();
        ExportPDF.SetReport(Rapport);
        ExportPDF.Compressed = false;
        ExportPDF.Background = false;
        ExportPDF.PrintOptimized = false;
        ExportPDF.OpenAfterExport = false;
                                        
        string Filename = "C:\MyReport.pdf";
        Rapport.Export(ExportPDF, Filename);
}
I've always been using that code because it works like a charm, but I can not convert these PDF files to TIFF via Ghostscript. Have I missed something?
Thanks.

Comments

  • edited November 2010
    Hi,

    In FastReport .NET you can export to TIFF directly, without export to PDF. Use this code:
    using FastReport.Export.Image;
    ...
    ...
    Report report = new Report();
    report.Load("report.frx");
    report.Prepare();
    ImageExport export = new ImageExport();
    export.ImageFormat = ImageExportFormat.Tiff;
    export.MonochromeTiff = false;
    export.MultiFrameTiff = false;
    export.OpenAfterExport = false;
    report.Export(export, "report.tiff");
    

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.