3 Replies Latest reply on Sep 11, 2018 11:02 AM by Mike Roosa

    Communicate with printer over network

    Mike Roosa

      I'm looking for the a way to accomplish the following:

      1. Print to any one of 50+ network printers at our site

      2. Get printer status if a printer is offline or has an error


      I have the ZPL code for the labels I need. I just need to know what's the best method for printing from a central program and getting printer statuses if possible. All of the printers are network printers on a windows server.


      We will most likely use C# or Python to build the program to communicate with the printer.


      What should I be reading up on? Should I be using sockets or the HTTP Post or am I looking at the wrong things? Can you point me to the best documentation for learning how to do this?



        • Re: Communicate with printer over network
          Robin West

          Hi Mike,

          There are several different methods for doing this, but if you have a mixed set of printers (older and newer) and you plan to stay within the local network, then TCP Sockets are your best option.  We have .NET and Java based SDKs for server/pc to support this.  They are not necessary, but helpful.

          The other main option is - If the printers are mostly newer models, you can use Websockets (HTTPS).  This will allow your app to go cloud based if you wanted and still have direct access to the printers.   The SDK supports this in Java.

          You could use things like HTTP Post or Browser Print for this, but I would not recommend it for your use case.  Post won't allow you to get status.  Browser Print could work, but it's cumbersome in my opinion for your use case.  Sockets would be faster and more robust.

          I would definitely recommend looking at our Best Practices document. 

          • Re: Communicate with printer over network
            Mike Roosa

            We are putting the finishing touches on this and for the most part everything is working great with the c# sdk.


            However, out of the 20+ printers, we have 3 that are causing an issue.


            When we attempt to get the status of the printer we get "Malformed Status Response" returned to us.


            What would cause this?


            I noticed these printers appear to be set up a little differently and not sure if they are compatible with the sdk or not.


            If I browse to one of these printers, the web page says: PrinterName - ZebraNet PrintServer.


            However, the other 20+ that are working says: PrinterName then says Internal Wired PrintServer, then Status: READY.


            Anyway to get those 3 set up the same way? What seems to be the issue here?