Anything strange with the PDF generated by FR?
jerome
France
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 :
Thanks.
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
In FastReport .NET you can export to TIFF directly, without export to PDF. Use this code: