Class StraightToPDF


  • public class StraightToPDF
    extends Object
    A demonstration that shows how to generate a report and save it to PDF without displaying the print preview or the PDF save-as dialog.
    Author:
    David Gilbert
    • Constructor Detail

      • StraightToPDF

        public StraightToPDF​(String filename)
                      throws org.pentaho.reporting.libraries.xmlns.parser.ParseException
        Creates a new demo application.
        Parameters:
        filename - the output filename.
        Throws:
        org.pentaho.reporting.libraries.xmlns.parser.ParseException - if the report could not be parsed.
    • Method Detail

      • savePDF

        public boolean savePDF​(org.pentaho.reporting.engine.classic.core.MasterReport report,
                               String fileName)
        Saves a report to PDF format.
        Parameters:
        report - the report.
        fileName - target file name.
        Returns:
        true or false.
      • main

        public static void main​(String[] args)
        Demo starting point.
        Parameters:
        args - ignored.