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:

---o0O0o---

Our .NET Developer Tools
XtremeDocumentStudio .NET

Multi-format document-processing component suite for .NET developers.

PDFOne .NET

A .NET PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, and bookmark PDF documents in .NET applications.

Our Delphi/C++Builder developer tools
XtremeDocumentStudio Delphi

Multi-format document-processing component suite for Delphi/C++Builder developers, covering both VCL and FireMonkey platforms.

eDocEngine VCL

A Delphi/C++Builder component suite for creating documents in over 20 formats and also export reports from popular Delphi reporting tools.

PDFtoolkit VCL

A Delphi/C++Builder component suite to edit, enhance, view, print, merge, split, encrypt, annotate, and bookmark PDF documents.

Our Java developer tools
XtremeDocumentStudio (for Java)

Multi-format document-processing component suite for Java developers.

PDFOne (for Java)

A Java PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, bookmark PDF documents in Java applications.

Our Platform-Agnostic Cloud and On-Premises APIs
StarDocs

Cloud-hosted and On-Premises REST-based document-processing and document-viewing APIs

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