2

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.

paulmelnikow
  • 16,895
  • 8
  • 63
  • 114

1 Answers1

2

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];
paulmelnikow
  • 16,895
  • 8
  • 63
  • 114