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.lang.String[] getPrinters()
          Retrieve printer deployed on the system.
static javax.print.PrintService[] getPrintServices()
          Retrieve Print services.
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)