I need my app to print to different printers. The windows computer where it’ll be running will have probably three printers connected.
Two of them, label printers (80 mm wide paper), and one regular printer to print reports and other normal stuff.
I need to have a way to identify those printers and automatically choose where it will print, depending on the content. Specially in the case of the label printers, as this is a POS I can’t have the user select the printer, this has to be a automated process. Sometime It might be necessary to print to the two label printers.
I’ve read quite a bit in the forum that this seems to be a rather complex thing. I think I have two approaches, please correct me if I’m wrong.
- Change the default printer before every print job and print to the default printer. (and restore the original default printer after every print job)
- Get Xojo to print to a specific printer among the installed printers. For this I read I have to have (get beforehand) the PrinterSetup.SetupString for each printer, so this would involve some previous (one time) configuration, right ?
I am leaning torwards otion 2. Will this work ? Can someone point me to some code example ?
@Tim Hare posted an example project back in this thread (https://forum.xojo.com/35613-choosing-special-printer-without-printer-dialog-in-windows-app/2) but it doesn’t seem to be available now.