Class JasperPrintManager


  • public final class JasperPrintManager
    extends java.lang.Object
    Facade class for the printing functionality exposed by the JasperReports library.

    After having filled a report, you have the option of viewing it, exporting it to a different format, or (most commonly) printing it.

    In JasperReports, you can print reports using this manager class. It contains various methods that can send entire documents or portions of them to the printer. It also allows people to choose whether to display the print dialog. one can display the content of a page from a JasperReports document by generating a java.awt.Image object for it using this manager class.

    Author:
    Teodor Danciu (teodord@users.sourceforge.net)
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static JasperPrintManager getInstance​(JasperReportsContext jasperReportsContext)  
      boolean print​(java.io.InputStream inputStream, boolean withPrintDialog)  
      boolean print​(java.io.InputStream inputStream, int pageIndex, boolean withPrintDialog)  
      boolean print​(java.io.InputStream inputStream, int firstPageIndex, int lastPageIndex, boolean withPrintDialog)  
      boolean print​(java.lang.String sourceFileName, boolean withPrintDialog)  
      boolean print​(java.lang.String sourceFileName, int pageIndex, boolean withPrintDialog)  
      boolean print​(java.lang.String sourceFileName, int firstPageIndex, int lastPageIndex, boolean withPrintDialog)  
      boolean print​(JasperPrint jasperPrint, boolean withPrintDialog)  
      boolean print​(JasperPrint jasperPrint, int pageIndex, boolean withPrintDialog)  
      boolean print​(JasperPrint jasperPrint, int firstPageIndex, int lastPageIndex, boolean withPrintDialog)  
      static boolean printPage​(java.io.InputStream inputStream, int pageIndex, boolean withPrintDialog)  
      static boolean printPage​(java.lang.String sourceFileName, int pageIndex, boolean withPrintDialog)  
      static boolean printPage​(JasperPrint jasperPrint, int pageIndex, boolean withPrintDialog)  
      static boolean printPages​(java.io.InputStream inputStream, int firstPageIndex, int lastPageIndex, boolean withPrintDialog)  
      static boolean printPages​(java.lang.String sourceFileName, int firstPageIndex, int lastPageIndex, boolean withPrintDialog)  
      static boolean printPages​(JasperPrint jasperPrint, int firstPageIndex, int lastPageIndex, boolean withPrintDialog)  
      static java.awt.Image printPageToImage​(java.io.InputStream inputStream, int pageIndex, float zoom)  
      static java.awt.Image printPageToImage​(java.lang.String sourceFileName, int pageIndex, float zoom)  
      static java.awt.Image printPageToImage​(JasperPrint jasperPrint, int pageIndex, float zoom)  
      static boolean printReport​(java.io.InputStream inputStream, boolean withPrintDialog)  
      static boolean printReport​(java.lang.String sourceFileName, boolean withPrintDialog)  
      static boolean printReport​(JasperPrint jasperPrint, boolean withPrintDialog)  
      java.awt.Image printToImage​(java.io.InputStream inputStream, int pageIndex, float zoom)  
      java.awt.Image printToImage​(java.lang.String sourceFileName, int pageIndex, float zoom)  
      java.awt.Image printToImage​(JasperPrint jasperPrint, int pageIndex, float zoom)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait