com.elixirtech.glint.print
Class PrinterUtil

java.lang.Object
  extended by com.elixirtech.glint.print.PrinterUtil

public final class PrinterUtil
extends java.lang.Object

Printer util to provide OS under printer


Method Summary
static javax.print.attribute.standard.MediaSizeName findMedia(java.lang.String media, float width, float height, int sz)
           
static javax.print.PrintService getDefaultPrintService()
          Get default Print service.
static java.awt.print.PageFormat getPageFormat(com.elixirtech.glint.IEye.PageSetup pageSetup)
           
static java.lang.String[] getPrinters()
          Retrieve printer deployed on the system.
static javax.print.PrintService[] getPrintServices()
          Retrieve Print services.
static java.awt.print.PageFormat getScaledPageFormat(com.elixirtech.glint.IEye.PageSetup pageSetup, java.awt.Dimension physicalPageSize)
           
static javax.print.PrintService getSelectedPrintService(java.lang.String printerName)
          Get selected Print services.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPrinters

public static java.lang.String[] getPrinters()
Retrieve printer deployed on the system. Supported on JDK 1.4 or greater.

Returns:
String[] Array of string of printer names.

getPrintServices

public static javax.print.PrintService[] getPrintServices()
Retrieve Print services. Supported on JDK 1.4 or greater.

Returns:
PrintService[] Array of PrintServices.

getSelectedPrintService

public static javax.print.PrintService getSelectedPrintService(java.lang.String printerName)
Get selected Print services. Supported on JDK 1.4 or greater.

Returns:
PrintService[] Array of PrintServices.

getDefaultPrintService

public static javax.print.PrintService getDefaultPrintService()
Get default Print service. Supported on JDK 1.4 or greater.

Returns:
PrintService[] Array of PrintServices.

findMedia

public static javax.print.attribute.standard.MediaSizeName findMedia(java.lang.String media,
                                                                     float width,
                                                                     float height,
                                                                     int sz)

getPageFormat

public static java.awt.print.PageFormat getPageFormat(com.elixirtech.glint.IEye.PageSetup pageSetup)

getScaledPageFormat

public static java.awt.print.PageFormat getScaledPageFormat(com.elixirtech.glint.IEye.PageSetup pageSetup,
                                                            java.awt.Dimension physicalPageSize)