Package net.sf.jasperreports.engine.export

Examples of net.sf.jasperreports.engine.export.JRPdfExporter$LocalFontMapper


    setContentType("application/pdf");
  }

  @Override
  protected net.sf.jasperreports.engine.JRExporter createExporter() {
    return new JRPdfExporter();
  }
View Full Code Here


   */
  public static void renderAsPdf(JasperReport report, Map<String, Object> parameters, Object reportData,
      OutputStream stream) throws JRException {

    JasperPrint print = JasperFillManager.fillReport(report, parameters, convertReportData(reportData));
    render(new JRPdfExporter(), print, stream);
  }
View Full Code Here

  public static void renderAsPdf(JasperReport report, Map<String, Object> parameters, Object reportData,
      OutputStream stream, Map<net.sf.jasperreports.engine.JRExporterParameter, Object> exporterParameters)
      throws JRException {

    JasperPrint print = JasperFillManager.fillReport(report, parameters, convertReportData(reportData));
    JRPdfExporter exporter = new JRPdfExporter();
    exporter.setParameters(exporterParameters);
    render(exporter, print, stream);
  }
View Full Code Here

    setContentType("application/pdf");
  }

  @Override
  protected JRExporter createExporter() {
    return new JRPdfExporter();
  }
View Full Code Here

    }
    OutputStream os = response.getOutputStream();
    response.setContentType("application/pdf");
    //TODO 支持下载报表文件时的文件名参数
    response.setHeader("Content-Disposition", "inline;filename="+ URLEncoder.encode("自定义文件名.pdf", "utf-8"));
    JRPdfExporter exporter = new JRPdfExporter();
    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
    exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, os);
    exporter.exportReport();
    os.close();
    return mapping.findForward(null);
  }
View Full Code Here

  }

  @SuppressWarnings("rawtypes")
  public Exporter setup() {
    exportConfiguration.setCompressed(Boolean.TRUE);
    return new JRPdfExporter();
  }
View Full Code Here

  @Test
  public void testRenderWithOutputStream() throws Exception {
    ByteArrayOutputStream os = new ByteArrayOutputStream();
    JasperPrint print = JasperFillManager.fillReport(getReport(), getParameters(), getDataSource());
    JasperReportsUtils.render(new JRPdfExporter(), print, os);
    byte[] output = os.toByteArray();
    assertPdfOutputCorrect(output);
  }
View Full Code Here

            JRExporter exporter;

            if (format.equals(FORMAT_PDF)) {
                response.setContentType("application/pdf");
                exporter = new JRPdfExporter();
            } else if (format.equals(FORMAT_CSV)) {
                response.setContentType("text/csv");
                exporter = new JRCsvExporter();
            } else if (format.equals(FORMAT_HTML)) {
                response.setContentType("text/html");
View Full Code Here

  /**
   * @see org.wicketstuff.jasperreports.handlers.IJRResourceHandler#newExporter()
   */
  public JRAbstractExporter newExporter()
  {
    return new JRPdfExporter();
  }
View Full Code Here

  /**
   * @see org.wicketstuff.jasperreports.handlers.IJRResourceHandler#newExporter()
   */
  public JRAbstractExporter newExporter()
  {
    return new JRPdfExporter();
  }
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.engine.export.JRPdfExporter$LocalFontMapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.