Expand details in NSPrintPanel by default?

Hi there,


we are getting frequent questions from our user base when they cannot find options in the print dialog of our app because the details in NSPrintPanel are not expanded by default.


Is there a way to always expand the details section programmatically to make it easier for our non-technical user base to find the app specific print settings..?


Browsing the NSPrintPanel documentation didn't reveal anything obvious..


Cheers,

Jay

Replies

Can you post the part where you define the accessoryView with your options ?


I suppose it is an OSX app ?


Here is how I do it, and I always get options visible by default

This is in the IBAction of the button that launches the printing.


        let printOp = NSPrintOperation(view: printView, printInfo: printInfo)
        printOp.canSpawnSeparateThread = true
        let accessoryController = PrintPanelExtensionController()
       
        accessoryController.title = "Specific to app" 
        accessoryController.typeToPrint = self.typeToPrint 
        printOp.printPanel.addAccessoryController(accessoryController)
     // If you need page setup options :
        let options : NSPrintPanel.Options = [NSPrintPanel.Options.showsOrientation, NSPrintPanel.Options.showsPreview, NSPrintPanel.Options.showsCopies, NSPrintPanel.Options.showsPageRange] 
        printOp.printPanel.options = options
        printOp.run()



There is also a PrintPanelExtensionController associated to a PrintPanelExtension.xib

Been a while - thanks for the pointer to NSPrintPanelOptions but it doesn't help expanding the details.
Note that you'd have to reset to the initial app state (e.g. by deleting the app's container) or macOS will remember if you've previously expanded the details section.

My aim is to expand the details section by default starting with the first launch of my Mac app to help (inexperienced) users along finding the app specific print settings (accessory controller).

Any hints appreciated,
Jay

Anyone ever figure this one out?

Still getting frequent emails from confused customers as I have a customer base of .. casual Mac users who don't understand that the macOS Print Panel can be expanded to show additional, application specific settings.

Any input from an Apple Engineer much appreciated.

cheers, Jan