资 源 简 介
A utility to open printer dialog and page setup dialog using SWT-win32.
user can setup printer and page before open the printer dialog and page setup dialog.
User Guide:
open a Printer Dialog with printer name, paper size and orient and save the new Setup in properties file:
```
//Create new printerSetup
PrinterSetup ps = new PrinterSetup();
ps.setPrinterName("Brother MFC-9420CN Printer");
ps.setOrient(PrinterSetup.DMORIENT_PORTRAIT);
ps.setPaperSize(PrinterSetup.DMPAPER_A4);
//open PrinterDialog with the printerSetup
PrinterData userPrinterData = PrinterSetupUtils.openPrinterDLG(ps);
//Save the ps as new Printer setup.
Properties prop = new Properties();
try {
InputStream fis = new FileInputStream("c:
extPrinter.properties");
prop.load(fis);
OutputStream fos = new FileOutputStream(configFilePath);
prop.setProperty("printer", ps.getPrinterName());
prop.setProperty("orient", String.valueOf(p