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 prattstatic DocFlavor
Get Default Application Flavorstatic PrintRequestAttributeSet
Return Default Print Request Attributesstatic PrintService
Get Default Print Servicestatic JobPriority
getJobPriority
(int pages, int copies, boolean withDialog) Get Job Priority based on pages printed.static PrinterJob
Return default PrinterJobstatic PrinterJob
getPrinterJob
(String printerName) Return PrinterJob with selected printer name.static PrintService[]
Get Print Services for standard flavor and prattstatic 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
-
Constructor Details
-
PrintUtil
public PrintUtil()
-
-
Method Details
-
getDefaultPrintRequestAttributes
Return Default Print Request Attributes- Returns:
- PrintRequestAttributeSet
-
getDefaultFlavor
Get Default Application Flavor- Returns:
- Pageable
-
getAllPrintServices
Get Print Services for all flavor and pratt- Returns:
- print services
-
getPrintServices
Get Print Services for standard flavor and pratt- Returns:
- print services
-
getDefaultPrintService
Get Default Print Service- Returns:
- PrintService
-
getPrinterJob
Return default PrinterJob- Returns:
- PrinterJob
-
getPrinterJob
Return PrinterJob with selected printer name.- Parameters:
printerName
- if null, get default printer (Ini)- 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 attribute set
-
print
public static void print(PrinterJob job, PrintRequestAttributeSet prats, boolean withDialog, boolean waitForIt) Print- Parameters:
job
- printer jobprats
- print 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. Called from VSetup- Parameters:
AD_Client_ID
- new ClienttrxName
-
-