Reputation: 17218
I'm setting jobDisposition to NSPrintPreviewJob
in NSPrintInfo
, but the value seems to be ignored. Instead of opening the document in Preview, the print operation displays the print panel as usual.
Upvotes: 2
Views: 283
Reputation: 17218
To go directly to preview, you need to suppress the print panel:
printInfo.jobDisposition = NSPrintPreviewJob;
NSPrintOperation *op = [NSPrintOperation printOperationWithView:view
printInfo:printInfo];
op.showsPrintPanel = NO;
[op runOperation];
Upvotes: 2