I’ve seen the example coming with the MBS plugin named NSPrintOperation and the language reference.
I’ve tried with:
Var g As Graphics
Var p As PrinterSetup
p = New PrinterSetup// clone to NSPrintInfo
dim info as new NSPrintInfoMBS(p.SetupString)// find out what name second printer has
dim printers() as string = NSPrinterMBS.printerNames
dim printer as NSPrinterMBS = NSPrinterMBS.printerWithName(printers(1))// now set this printer
info.printer = printer// and clone back
p.SetupString = info.SetupString//If p.ShowPageSetupDialog Then
g = p.ShowPrinterDialogIf g <> Nil Then
… print …
but it doesn’t take the second printer (at least on a Mac, on another Mac seems to catch it)
How to setup to print on a specific named printer calling by its name (i.e. OKI) ?
And how to print without the printer dialog ?
In the example is used this code:
dim v as NSViewMBS = TextArea1.NSViewMBS
dim o as NSPrintOperationMBS = NSPrintOperationMBS.printOperationWithView(v)o.showsPrintPanel = false
o.runOperationModalForWindow(Self)
o = nil
But i don’t understand how to adapt to my needs cause i don’t have a textarea1…