net.sf.jasperreports.engine.print

## Class JRPrinterAWT

- java.lang.Object
- - net.sf.jasperreports.engine.print.JRPrinterAWT

- All Implemented Interfaces:
    java.awt.print.Printable

      public class JRPrinterAWT
      extends java.lang.Object
      implements java.awt.print.Printable

  Version:
    $Id: JRPrinterAWT.java 6805 2014-01-10 12:42:19Z teodord $
  Author:
    Teodor Danciu (teodord@users.sourceforge.net)

- - ### Field Summary

    - ### Fields inherited from interface java.awt.print.Printable

      `NO_SUCH_PAGE, PAGE_EXISTS`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `JRPrinterAWT(JasperPrint jrPrint)`
    `` | `JRPrinterAWT(JasperReportsContext jasperReportsContext, JasperPrint jasperPrint)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static long` | `getImageSize(JasperPrint jasperPrint, float zoom)`
    `static void` | `initPrinterJobFields(java.awt.print.PrinterJob job)` Fix for bug ID 6255588 from Sun bug database
    `int` | `print(java.awt.Graphics graphics, java.awt.print.PageFormat pageFormat, int pageIndex)`
    `boolean` | `printPages(int firstPageIndex, int lastPageIndex, boolean withPrintDialog)`
    `static boolean` | `printPages(JasperPrint jrPrint, int firstPageIndex, int lastPageIndex, boolean withPrintDialog)`
    `java.awt.Image` | `printPageToImage(int pageIndex, float zoom)`
    `static java.awt.Image` | `printPageToImage(JasperPrint jrPrint, int pageIndex, float zoom)`

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### JRPrinterAWT

          protected JRPrinterAWT(JasperPrint jrPrint)
                          throws JRException

      Throws:
        `JRException`

    - #### JRPrinterAWT

          public JRPrinterAWT(JasperReportsContext jasperReportsContext,
                      JasperPrint jasperPrint)
                       throws JRException

      Throws:
        `JRException`

  - ### Method Detail

    - #### printPages

          public static boolean printPages(JasperPrint jrPrint,
                           int firstPageIndex,
                           int lastPageIndex,
                           boolean withPrintDialog)
                                    throws JRException

      Throws:
        `JRException`
      See Also:
        `printPages(int, int, boolean)`

    - #### printPageToImage

          public static java.awt.Image printPageToImage(JasperPrint jrPrint,
                                        int pageIndex,
                                        float zoom)
                                                 throws JRException

      Throws:
        `JRException`
      See Also:
        `printPageToImage(int, float)`

    - #### printPages

          public boolean printPages(int firstPageIndex,
                           int lastPageIndex,
                           boolean withPrintDialog)
                             throws JRException

      Throws:
        `JRException`

    - #### print

          public int print(java.awt.Graphics graphics,
                  java.awt.print.PageFormat pageFormat,
                  int pageIndex)
                    throws java.awt.print.PrinterException

      Specified by:
        `print` in interface `java.awt.print.Printable`
      Throws:
        `java.awt.print.PrinterException`

    - #### printPageToImage

          public java.awt.Image printPageToImage(int pageIndex,
                                        float zoom)
                                          throws JRException

      Throws:
        `JRException`

    - #### initPrinterJobFields

          public static void initPrinterJobFields(java.awt.print.PrinterJob job)

      Fix for bug ID 6255588 from Sun bug database
      Parameters:
        `job` - print job that the fix applies to

    - #### getImageSize

          public static long getImageSize(JasperPrint jasperPrint,
                          float zoom)

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com