Is there any way to get only the ZPL printers in the system in Java? I don't want to list printers which does not allow to print Zebra Commands. Thanks.
Asked
Active
Viewed 36 times
0
-
Read the answers to [How do I get a list of installed printers?](https://stackoverflow.com/questions/410967/how-do-i-get-a-list-of-installed-printers) and see if you can modify the code to get Zebra printers. – Gilbert Le Blanc Jun 01 '23 at 15:06
-
Gilbert, I know how to get the list of printers, but I don't know how to check if the printer accept ZPL code or not... I didn't found the Zebra SDK for Java to see if there is any class which can be used to list only the ZPL printers. That's I asked, maybe someone did it! This is what I asked, if can I check somehow if the printer in the list accept ZPL code or not. – Vali Maties Jun 01 '23 at 16:52
-
Don't you know which printers are Zebra printers? Create a `List` of all the Zebra printers in your network, then compare your list to the printer list. – Gilbert Le Blanc Jun 01 '23 at 18:52
-
Gilbert, is not about me... it is about the user which uses the application. He see a combobox with some printers. If I don't filter the comobox with only the printer which can print the ZPL code for the label he/she can choose any printer which is displayed in the system. That's why I tought someone found a way of filtering the printers based on the language, or some attributes, but seems the 420t does not return this attribute. – Vali Maties Jun 02 '23 at 20:42
-
Usually, network developers give special printers special printer identifiers. Like, all Zebra printers have a network identifier that starts with the letter Z. If only the user knows the network printer identifier for a Zebra printer, then he'll have to tell you his printer is a Zebra printer. – Gilbert Le Blanc Jun 02 '23 at 22:10
1 Answers
0
Using the Zebra SDK you can make use of the different *Discoverer classes:
- NetworkDiscoverer
- RemoteDiscoverer
- UsbDiscoverer
For example,
for (DiscoveredPrinterDriver discoveredPrinter : UsbDiscoverer.getZebraDriverPrinters()) {
log.info("Driver USB Printer " + discoveredPrinter);
}

dominikkv
- 216
- 3
- 13
-
The SDK does not install I get an error: Flexeraayd$aaa: Windows DLL failed to load at Flexeraayd.af(Unknown Source) at Flexeraayd.aa(Unknown Source) at com.zerog.ia.installer.LifeCycleManager.init(Unknown Source).... and more – Vali Maties Jul 21 '23 at 13:06
-
I have unzipped the SDK, and I found an archive in InstallerData\Disk1\InstData folder named Resource1.zip . In this archive there are some jar files, one for each platform they say it works this sdk. Seems "PC_zg_ia_sf.jar" is fo Java. I will make some tests with this jar file. – Vali Maties Jul 21 '23 at 13:20