0

I'm using [[NSPrintOperation printOperationWithView:drawingView] runOperation]; and I get this view:

printer preview window

There is no option to choose between Landscape or Portrait I found that I can have [[NSPrintOperation printOperationWithView:drawingView printInfo:info] runOperation]; and set info.orientation = NSPaperOrientationLandscape . In that case I would get the preview in landscape but the user does not have the option.

How can I offer the option? (note: I don't see it under 'show Details' either)

Thomas
  • 8,306
  • 8
  • 53
  • 92

1 Answers1

0

Portrait and landscape buttons are in the page layout panel (Page Setup… in the File menu). See NSPageLayout and -[NSApplication runPageLayout:]. It is possible to add the portrait and landscape buttons to the print panel:

NSPrintPanel *printPanel = printOperation.printPanel;
printPanel.options |= NSPrintPanelShowsOrientation;

and/or

printPanel.options |= NSPrintPanelShowsPageSetupAccessory;
Willeke
  • 14,578
  • 4
  • 19
  • 47