Get a list of installed printers?

I’ve been looking at how to manage printing in XoJo.

I don’t have much experience yet.

It looks like most people use the printer dialog and then save a printer “connection string” for later connections.

I’m going to use a zebra printer for my app. In the past, with .net you can print directly to them by sending ZPL/EPL commands as a string to the USB device.

I want to have a printer settings window where the user picks the zebra printer from a list of printers, for future use. I want to by pass the printer dialog boxes completely because the app will print labels on specific events (so I don’t want to have to stop, pick a printer, and click “print”).

I’ve looked at the SpecialFolders. I’m on a Mac and this is the output from /System/Library/Printers/Libraries

drwxr-xr-x 3 root wheel 96 17 Aug 19:47 USBGenericPrintingClass.plugin drwxr-xr-x 3 root wheel 96 17 Aug 19:47 USBGenericTOPrintingClass.plugin -rwxr-xr-x 1 root wheel 34464 30 Nov 01:33 commandInk -rwxr-xr-x 1 root wheel 136048 30 Nov 01:34 ipp2ppd -rwxr-xr-x 1 root wheel 102496 30 Nov 01:34 libConverter.dylib -rwxr-xr-x 1 root wheel 161392 30 Nov 01:33 makequeuesagent -rwxr-xr-x 1 root wheel 30176 30 Nov 01:33 snmpInk

( none of these entries are my printer… )

So I don’t think SpecialFolders is the right way to go here. I’ve not seen a Printer class that allows you to enumerate the installed printers… Is there something?

https://forum.xojo.com/48360-printing-in-a-multi-printer-setup-best-approach/0

be aware that the proposed method I give here will not work to publish on the mac app store
as it calls to the system shell.

another methods here : https://forum.xojo.com/38477-frustration-with-printersetup-strings/0

That’s perfect @Jean-Yves Pochez - just what I needed.

I’m not planning on using the App Store at the moment but thanks very much for pointing that out.