예제 #1
0
 public PrinterSettings()
 {
     printer       = PMPrinterEx.DefaultPrinter();
     printer_name  = printer?.Name;
     page_settings = new PageSettings(this);
     //PaperSizes = new PaperSizeCollection(new[] { new PaperSize("Letter", (int)(8.5f * 72f), (int)(11f * 72f)) });
     PaperSources = new PaperSourceCollection(new PaperSource[] { });
 }
예제 #2
0
 public PrinterSettings()
 {
     if (PMServer.CreatePrinterList(out PMPrinter[] printers) == 0)
     {
         printer = printers.FirstOrDefault(x => x.IsDefault);
     }
     printer_name  = printer?.Name;
     page_settings = new PageSettings(this);
     //PaperSizes = new PaperSizeCollection(new[] { new PaperSize("Letter", (int)(8.5f * 72f), (int)(11f * 72f)) });
     PaperSources = new PaperSourceCollection(new PaperSource[] { });
 }