Hello all!
I just bought a ZD420t label printer that we want to use in our company.
We already have a printer (other brand) that I can access via an SDK and I've written a VB.net software to load a label file and fill out the variable text fields and also QR codes.
Now I want to do that using the ZD420t. I've created labels and named the all elements I want to fill out using my VB.net software, installed the zebra.printer.sdk - but how do I open the printer (USB, NOT LAN), load the label and submit the data to the the desired elements?
I looked at the code examples, but I don't know any C language, I also don't find how to access/connect the USB printer or load a label.
(the other printer I mentioned had vb.net examples available and it was really easy to achieve results in no time)
Can anyone point me to the right direction or show me examples of how to do that?
I've already searched the community, googled for hours, but now I am kinda desperate
Many thanks in advance,
Robert
4 Replies
Dmitry, can you direct me to where I can download the SDK that includes the VB.NET DLL library?
Hi Robert, I can help write some samples, but I'm not sure what kind of label file you have. Can you share a version? There are a lot of options for what kind of labels you can print so it would be useful.
Hello Robert,
Here you can see an FormatUtil Interface usage example that is implemented on C#.Net. Using this example you can implement it in the same way on VB.Net, using same classes and methods. The only thing you need to change is to use UsbConnection class constructor instead of TcpConnection class constructor used in example. Use configured name of your printer as a parameter for UsbConnection class constructor.
Also, you can use Zebra designer to export your label format to the printer. This way you can use it later with "^XF" ZPL command to print a label.
Hope it helps.
Dmitry Prokhorov
Software Engineer, Kutir Mobility
Posted on behalf of Zebra Technologies
Hello Dmitry!
Thanks for your reply!
Mmmh, like I said, I don't speak C# (I'm not a software engineer, all I know about programming is self-taught), but I think I got the connection part done.
I guess I have to use the printer name I find in "devices and printer" in the Windows control panel as string and open the connection.
But in your example I only see labels that have been stored on the printer. Is it possible to load them from a folder that's located on the PC?
Also, the vars dictionary: I can not use the names of the elements on a label? The element names, for example, are "text1" or "QR_serial".
I think the integer numbers (11, 12) in the example code relate to the ZPL code (FN11, FN12) and I can not use string element names.
Loading the .lbl file, replacing the text elements with the actual content and then print is not possible with the SDK?
We can not store every label on the printer, they need to be on the PC that has the connection to the printer.
Is there any solution for this?