Send ZPL to a shared ZD220 (no network capability) using SDK

// Expert user has replied.
H Humberto Mockel 11 months 3 weeks ago
248 3 0

Hello! I'm currently developing an application where I need to send ZPL commands to the printer. I successfully discovered the printer and printed labels via either Direct USB and Driver Discovery methods in the host computer using the SDK (same as in the demo program), but I need to also use the printer from other computers in the network. I tried the approach of sharing the printer via the traditional Windows printer share method and installing the ZDesigner driver in the remote computer, wich gives access to the printer via the "\\host.name\printer" name. Now in the remote ocmputer, Windows apps can still print to the label printer (notepad as an example) but sending the ZPL commands via the method:

        thePrinterConn->Write(System::Text::Encoding::UTF8->GetBytes(data));

Doesn't work on the remote computers, only in the host computer. Is there an alternative to send ZPL commands from a remote computer, if traditional Windows sharing isn't supported on the SDK? My printer is a normal ZD220 with direct USB connection, no network option.

Please Register or Login to post a reply

3 Replies

S Steven Si

Instead of using the USB connection, connect the ZD220 printer on the network. The printer can be discovered and connected from all computers on the same network via the TCP connection. Then the computers on the same network can send ZPL to the printer via the TCP connection. Check out the API in the SDK for the details of the TCP connection. The developer demo that comes with the SDK has the sample code for the TCP connection. If your printer doesn't have the network option, you can order a network card for it.

H Humberto Mockel

I searched online but couldn't find which add-on card I need for a ZD220, also it would be nearly impossible to find or uneconomical to get (it's the Argentinian market, the printer itself sells for rocket prices). Also there are no USB to Ethernet print servers available unless I import them, so also not an option.

My only reachable solution would be using a PC as a server. Is there a way to configure Windows, or a third party app to get the PC working as a print server and let me share the USB ZD220 as a network printer? Then I could use network discovery on the SDK.

H Humberto Mockel

I ended up bypassing the driver and sending the ZPL using this method: https://learn.microsoft.com/en-us/troubleshoot/windows/win32/win32-raw-data-to-printer

It works also if using the shared printer driver in a remote computer, so great. Thanks anyway for the help, definitely it's the last time I buy a printer without network capabilities!

CONTACT
Can’t find what you’re looking for?