Printer Tray

Hello, how can I check the number of trays in the connected printer? Can I set a programmatically required tray for printing different paper sizes?


Replies

See

h ttps://developer.apple.com/documentation/appkit/nsprinter

should probably be useful for this.


I think information should be in

var deviceDescription: [NSDeviceDescriptionKey : Any]

Whicheturns a dictionary of keys and values describing the device.


But I cannot find details or sample code for it.

So, may be you can print the whole dictionary to look for a key that refers to tray ?


Note: this is not a swift forum question, more a devices one probably.

I can't find this field in ios api, it's available only for mac?

Can you tell me about which type of printer you have, if your Epson printer it is much easier to set up a printer try?