Package org.compiere.print
Class PrintUtil
java.lang.Object
org.compiere.print.PrintUtil
Print Utilities
- Version:
- $Id: PrintUtil.java,v 1.2 2006/07/30 00:53:02 jjanke Exp $
- Author:
- Jorg Janke
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
dump
(PrinterJob job) Dump Printer Job infostatic void
dump
(PrintRequestAttributeSet prats) Dump Print Request Service Attribute Set to System.outstatic void
dump
(PrintServiceAttributeSet psas) Dump Print Service Attribute Set to System.outstatic void
Dump Stream Print Servicesstatic void
Dump Stream Print Servicesstatic PrintService[]
Get Print Services for all flavor and print request attributesstatic DocFlavor
Get Default Application Flavorstatic PrintRequestAttributeSet
Get Default Print Request Attributesstatic PrintService
Get Default Print Servicestatic JobPriority
getJobPriority
(int pages, int copies, boolean withDialog) Get Job Priority based on pages printed.
The more pages, the lower the priority.static PrinterJob
Get default PrinterJobstatic PrinterJob
getPrinterJob
(String printerName) Get PrinterJob with selected printer name.static PrintService[]
Get Print Services for standard flavor and print request attributesstatic void
Print (async)static void
print
(Pageable pageable, PrintRequestAttributeSet prats) Print Asyncstatic void
print
(PrinterJob job, PrintRequestAttributeSet prats, boolean withDialog, boolean waitForIt) Printstatic void
setupPrintForm
(int AD_Client_ID) Create Print Form and Print Formats for a new Clientstatic void
setupPrintForm
(int AD_Client_ID, String trxName) Create Print Form and Print Formats for a new Client.
- Order, Invoice, etc.
-
Constructor Details
-
PrintUtil
public PrintUtil()
-
-
Method Details
-
getDefaultPrintRequestAttributes
Get Default Print Request Attributes- Returns:
- PrintRequestAttributeSet
-
getDefaultFlavor
Get Default Application Flavor- Returns:
- Pageable
-
getAllPrintServices
Get Print Services for all flavor and print request attributes- Returns:
- print services
-
getPrintServices
Get Print Services for standard flavor and print request attributes- Returns:
- print services
-
getDefaultPrintService
Get Default Print Service- Returns:
- PrintService
-
getPrinterJob
Get default PrinterJob- Returns:
- PrinterJob
-
getPrinterJob
Get PrinterJob with selected printer name.- Parameters:
printerName
- if null, get default printer (Ini.P_PRINTER)- Returns:
- PrinterJob
-
print
public static void print(Pageable pageable, String printerName, String jobName, int copies, boolean withDialog) Print (async)- Parameters:
printerName
- optional printer namejobName
- optional printer job namepageable
- pageablecopies
- number of copieswithDialog
- if true, shows printer dialog
-
print
Print Async- Parameters:
pageable
- pageableprats
- print request attribute set
-
print
public static void print(PrinterJob job, PrintRequestAttributeSet prats, boolean withDialog, boolean waitForIt) Print- Parameters:
job
- printer jobprats
- print request attribute setwithDialog
- if true shows DialogwaitForIt
- if false print async
-
getJobPriority
Get Job Priority based on pages printed.
The more pages, the lower the priority.- Parameters:
pages
- number of pagescopies
- number of copieswithDialog
- dialog gets lower priority than direct print- Returns:
- Job Priority
-
dump
Dump Printer Job info- Parameters:
job
- printer job
-
dump
Dump Print Service Attribute Set to System.out- Parameters:
psas
- PS Attribute Set
-
dump
Dump Print Request Service Attribute Set to System.out- Parameters:
prats
- Print Request Attribute Set
-
dump
Dump Stream Print Services- Parameters:
docFlavor
- flavoroutputMimeType
- mime
-
dump
Dump Stream Print Services- Parameters:
docFlavor
- flavor
-
setupPrintForm
public static void setupPrintForm(int AD_Client_ID) Create Print Form and Print Formats for a new Client. - Order, Invoice, etc. Called from VSetup- Parameters:
AD_Client_ID
- new Client
-
setupPrintForm
Create Print Form and Print Formats for a new Client.
- Order, Invoice, etc.- Parameters:
AD_Client_ID
- new ClienttrxName
-
-