eDocEngine VCL
Create documents and reports in 18 formats
Compatibility
Delphi C++Builder

Reusing Images in ReportBuilder Reports While Exporting to PDF

Does your ReportBuilder report contain logos in the page header / footer that repeat on every page? Do you wish to store only a single copy of the logo when you export the report to PDF and greatly reduce your PDF file size? This article will illustrate how to achieve this using Gnostice eDocEngine VCL along with Gnostice ReportBuilder Export Interface.
By S. Vikram & S. Bhamini

It is common to have the company logo in a report’s header/footer section. However, when such reports are exported to PDF, by default, a separate copy of the same image is stored for each page in the report, unnecessarily adding to the size of the PDF document. If you are using ReportBuilder for generating your reports, then you can use Gnostice eDocEngine to export the report to PDF and optimize the process to store only one copy of the image in the PDF file and reuse it on each page of the report as required.

eDocEngine provides features to refer to images being inserted into the document and later reuse them with the help of the reference. These features are exposed through OnEncodeGraphic and OnEncodeGraphicDone events of gtRBExportInterface component. Reusing common images can greatly reduce the file size of the PDF document. Our article will demonstrate how to do this, using an example report.

The following example uses a ReportBuilder report with three images in the page header and connects to ‘Biolife’ table of the ‘DBDEMOS’ database (which comes along with Delphi).

Add gtPDFEngine and gtRBExportInterface components to your project, for exporting the reports to PDF
Add code to handle the images
Add code to export the ReportBuilder report
--- oO0Oo ---

Downloads:

Privacy | Legal | Feedback | Newsletter © 2002-2010 Gnostice Information Technologies Private Limited. All rights reserved.

This site is best viewed on a screen with minimum resolution of 1152 x 864 pixels. Windows users are advised to use Microsoft ClearType Tuning for optimal experience. Linux and other users can enable font smoothing, as supported by their OS. Also, please use the latest version of a standards-compliant browser such as Opera, FireFox, Chrome or Safari.