PDF layer (Beta 1.0)

RReport provides a class called PDFLayer which can interface with several PDF libraries in order to export your report to PDF. The current implementation of the PDFLayer uses a slightly modified version of the library iText.

The library iText and the PDFLayer class for RReport are provided under the GNU LIBRARY GENERAL PUBLIC LICENSE. A copy of the terms of licenses are included in the downloadble zip file.


The following limitations must be taken into account when exporting to PDF using iText:


Download and installation

In order to install the library you must:

  1. download the zip file here. The documentation of the library itself can be found here, however you will not need it unless you want to change the PDFLayer class.
  2. unzip the downloaded file.
  3. copy the file rpdf.zip to the same directory where you installed RReport.



In order to export to PDF you must:

  1. set the name of the file with RReport.setPDFFile() method
  2. print or preview the report. The pdf file will be created at the same time you preview or print the report.
  3. if you don't want to print nor preview the report, use the RReport.disablePrinting() method.

A complete example can be found in the examplePDFOrder.java included in the downloaded zip file. In order to run the example you must:

  1. Copy the files: runExamplePDF.Bat and examplePDFOrder.class to the directory where RReport is installed.
  2. execute runExamplePDF.Bat.
  3. the file example.pdf will be created.


Changes to iText

The provided version of iText contains the following modifications: