4 Replies Latest reply on Jan 23, 2018 4:44 PM by Kent Kim

    How to get uid of a printer

    Kent Kim

      I am developing a printing solution that our server sends print request to usb connected printer and the printer prints.

      Printers are connected with usb to a PC, and there can be multiple PCs to get print requests from the server.

      With Browser Print I can get uid of each printer and the server can easily stores uids and decide which PC to send a request.

      But it seems Browser Print does not support parallel port(printer side) to usb(pc side) connection, and for our client's needs we decided to develop our solution.

      In C#, I can send commands to a printer with its registered name on the PC.

      But this name is automatically generated by system (like 'ZDesigner ZT230-200dpi ZPL') and can be edited by users, so the server does not know its name until the printer driver is installed, and different pc can have same name printers which means a name of a printer is not unique.

      So I want to get uid information but I could not find corresponding ZPL command yet.


      In short, how to get uid of a printer? ZPL command, system information, or driver information is all fine.

        • Re: How to get uid of a printer
          Manuel Caicedo-Rivera

          Hi Kent,


          I do not know exactly your architecture of the solution, but there are two possibilities that I could recommend to you if you are implementing a bi-directional communication with Link-OS printers.


          The first one to personalize the name of the printer, you can modify the friendly_name of the printer, and the printer will be unique for any search you will be doing through a network.


          The command to set up this friendly name would be:


          ! U1 setvar "device.friendly_name" "Any_name"


          Or there are two more variables that you can modify and these would be unique for that particular printer:


          ! U1 setvar "device.user_p1" "Any_name_decription"


          ! U1 setvar "device.user_p2" "Any_name_description"


          For getting the string back during the searching for the printers you can use the following SGD command:


          ! U1 getvar "device.friendly_name"


          ! U1 getvar "device.user_p1"


          ! U1 getvar "device.user_p2"


          I hope this works.