首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > SWT打印对话框扩展

SWT打印对话框扩展

  • 资源大小:24.00 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: 打印 swt 对话框 扩展

资 源 简 介

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
VIP VIP
0.166947s