Print Quality of pdf file is really pixelated

Hi There. I have develoved a report in FastReports designer. When I execute the report from designer and then email the report to myself or anyone else, the report size is fairly small and around 2Mb in size. However if I run an executable C# program to run the report and then email directly to a user, the file size is around 20Mb and it is highly pixelated and poor quality. I have tried everything to improve this. It just seems as if the report is being generated as an image file (even though I am following exactly the same process as described by FastReports themselves). I am at a witsend as this report is part and parcel of an app I am developing on IOS and Android. Please if there are any bright sparks out there, please assist. I have tried using the fastreports help centre, but noone understands what my issue is.

Comments

  • Hello!

    A sharp increase in the size of the PDF (from 2 MB to 20 MB) and the text appearing pixelated as if it were an image when exported from the code indicate that the application is using the raster-based PDFSimpleExport exporter (FastReport.OpenSource. Export.PdfSimple) is being used in the application, which renders each page as a PNG/JPEG raster, or that rasterisation/curves are enabled in the commercial PDFExport (TextInCurves = true). In Desktop Designer, however, the vector-based PDFExport is used by default.

    What to do:

    If you have a commercial licence, replace PDFSimpleExport with the vector-based FastReport.Export.Pdf.PDFExport:

    using var pdf = new FastReport.Export.Pdf.PDFExport
    {
    PrintOptimized = true,
    TextInCurves = false
    };
    report.Export(pdf, ‘out.pdf’);
    

    If you are using the free PDFSimpleExport (FastReport.OpenSource.Export.PdfSimple), increase the rendering resolution (the default is 96 DPI) to eliminate pixelation:

    using var pdf = new FastReport.Export.PdfSimple.PDFSimpleExport { ImageDpi = 300 };
    report.Export(pdf, ‘out.pdf’);
    
This discussion has been closed.