def to_pdf(*args)
      options = extract_options!(args)
      datasource = args[0]
      _JasperPrint                 = Rjb.import('net.sf.jasperreports.engine.JasperPrint')
      _JasperExportManager         = Rjb.import('net.sf.jasperreports.engine.JasperExportManager')
      _JasperExportManager._invoke('exportReportToPdf', 'Lnet.sf.jasperreports.engine.JasperPrint;', prepare(datasource))
    end
def to_pdf(*args)
      options = extract_options!(args)
      datasource = args[0]
      _JasperPrint                 = Rjb.import('net.sf.jasperreports.engine.JasperPrint')
      _JasperExportManager         = Rjb.import('net.sf.jasperreports.engine.JasperExportManager')
      _JasperExportManager._invoke('exportReportToPdf', 'Lnet.sf.jasperreports.engine.JasperPrint;', prepare(datasource))
    end
Constructor for a report generator
 Export report to PDF with given datasource