Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fast Reports is generating huge PDF files – what can be done?

When I generate a simple 10-page report with Fast reports 4.12.2 and save it as a PDF it is about 5 Meg’s in size.

A similar report generated in Rave Reports and converted to PDF with eDocEngine is about 50k in size.

This is how the Fast report TfrxPDFExport component is setup:

  object frxPDFExport1: TfrxPDFExport
    UseFileCache = True
    ShowProgress = True
    OverwritePrompt = False
    CreationTime = 40993.786098020840000000
    DataOnly = False
    OnBeginExport = frxPDFExport1BeginExport
    PrintOptimized = True
    Outline = False
    Background = False
    HTMLTags = True
    Author = 'FastReport'
    Subject = 'FastReport PDF export'
    ProtectionFlags = [ePrint]
    HideToolbar = False
    HideMenubar = False
    HideWindowUI = False
    FitWindow = False
    CenterWindow = False
    PrintScaling = False
    Left = 216
    Top = 56
  end

What can I do to get the Fast Report generated PDF smaller ?

like image 805
Charles Faiga Avatar asked Oct 23 '25 07:10

Charles Faiga


2 Answers

This is not an uncommon problem:

  • Fonts embedding in FastReport PDF [It was decided to improve fonts embedding in FR5]

  • https://forums.embarcadero.com/message.jspa?messageID=551654

Your best bet is either

  1. Choose a different report generator

  2. Don't use FastReport's built-in PDF generator.

For example, you might try Synopse

like image 174
paulsm4 Avatar answered Oct 25 '25 09:10

paulsm4


The main properties that will affect size are:

  frxPDFExport1.Compressed := true;
  frxPDFExport1.PrintOptimized := false;
  frxPDFExport1.EmbeddedFonts := false;

Also consider varying

 frxPDFExport1.PictureDPI := 150;
 frxPDFExport1.Quality := 95;
like image 28
Andrew Pratt Avatar answered Oct 25 '25 08:10

Andrew Pratt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!