I am trying to print tickets on a thermal printer with my Mac. With that I have no problems. I use NSPrintOperation to perform the operation, assisted by NSPrinterInfo to the issue of margins and other settings. The problem is that when I send the order to print the NSView always get the option to choose the printer, number of copies etc ... I'd like to directly print the ticket without going through this intermediate state. Can anyone help me do this?
Asked
Active
Viewed 1,738 times
1 Answers
2
From the documentation, you can choose to set the showsPrintPanel property as follows;
let printOperation = NSPrintOperation(view: someView)
printOperation.showsPrintPanel = false
printOperation.runOperation()

ColinMasters
- 511
- 7
- 19
-
Could you please fix the documentation link. Thanks – ICL1901 Feb 25 '17 at 22:05
-
1Sorry, fixed the link. – ColinMasters Apr 11 '17 at 17:46