PDF Export of large bitmap causes EOutOfResources

I have a simple report of one DIN A4 page. The page is filled with a large bitmap. I use TfrxPDFExport to create a PDF.

With FastReport VCL 4 the size of the generated PDF file was about 200 KB.

With FastReport VCL 5 the export results in a EOutOfResources Error. I have to reduce the size of the bitmap so that the export will work at all. Then still, the generated PDF file is about ten times bigger than the old one.

What happened? I was hoping that with VCL 5 the PDF export would improve. But actually it got worse! Is there anything I can do to get a better result?

Comments

  • edited 4:06PM
    I did not do much testing with large image size, but you can try to test if changing the following properties help to reduce the PDF size.

    frxPDFExport.Compressed (If True... output file is compressed, file-size is reduced but export time is increased)
    frxPDFExport.PrintOptimized (If True, graphic images output in high resolution for accurate printing; this option is only necessary when a document contains graphics and will be printed; output file size is considerably increased)
    frxPDFExport.Quality (Change the image quality... I'm not sure if this option only apply to JPEG)
  • ameame
    edited 4:06PM
    Thanks for the advice, but unfortunately these options do not change much. In my settings Compressed is already true. Reducing Quality and setting PrintOptimized to false has only a small effect (<10%).

    Here are the numbers of one example:
    PDF size with TfrxPDFExport VCL 4: 139 KB
    PDF size with TfrxPDFExport VCL 5: 871 KB
    PDF size with SynPDF 1.18: 192 KB

    My major point here is: why is the VCL 5 export performing worse than VCL 4? This was not what I expected when I upgraded to VCL 5. I see many people asking for an improved pdf-export in FastReport for many reasons for years now. Will that ever happen?

    I can not sell such bloated files. I have moved to SynPDF.
  • gpigpi
    edited 4:06PM
    Create support ticket and send report template (fr3) and saved preview pages (fp3)
  • ameame
    edited 4:06PM
    According to support, decreasing the image resolution is the only option here.

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.