Android Question How to send ZPL commands through B4A

joaquinortiz

Active Member
Licensed User
Hello fellows, I'm a Zebra Partner, and I want to know hoy to send ZPL printing language through B4A.

I usually send this with Windows Mobile using vb.net (compact framework) making an Open COM1 device subrouting, sending ZPL language by Bluetooth.

How can I do it with B4A?

I'll appreciate any help.
 

oparra

Well-Known Member
Licensed User
What type of connection are you looking for to send ZPL commands?

Wifi, USB, Serial (COM)

develop a project to Print QR Cards for zebra printers with ZPL commands.
 

oparra

Well-Known Member
Licensed User
Link:

 

joaquinortiz

Active Member
Licensed User
What type of connection are you looking for to send ZPL commands?

Wifi, USB, Serial (COM)

develop a project to Print QR Cards for zebra printers with ZPL commands.
Firstable, oparra, thanks for your response. I'll look around that link.

I pretend to send ZPL commands to Zebra ZQ600 Series model (receipt printer) vía Bluetooth, in this case. Further I will need to know how to send it vía Wifi. At this moment is Bluetooth.
 

oparra

Well-Known Member
Licensed User
I leave you a guide that will help you understand the connections to devices.

Look at this example, the file connector.bas


and


spanish creation;

 

oparra

Well-Known Member
Licensed User
Zebra printers detect ZPL commands when they are sent.

There is design software and a link to create custom commands.

Link very good tool:

 

oparra

Well-Known Member
Licensed User
Post your questions in the Spanish and English forum.

In the Spanish Spanish forum you will also have a lot of help.

Greetings from Chile
 

oparra

Well-Known Member
Licensed User
In my experience when printing barcodes, it is better to print a pdf.

On the web it is recommended to print on thermal printers.
 

joaquinortiz

Active Member
Licensed User
In my experience when printing barcodes, it is better to print a pdf.

On the web it is recommended to print on thermal printers.
Zebra or Honeywell printers only hear ZPL or IPL/Directprotocol commands printers, thru Zebra/Honeywell handhelds.
 

Bladimir Silva Toro

Active Member
Licensed User

Attachments

Last edited:

joaquinortiz

Active Member
Licensed User
Hi @joaquinortiz

I have a Zebra iMZ320 printer that connects via BlueTooth. You are printing use B4A do not use ZPL commands.

Printing is something basic just text and does the line return, read here: https://www.zebra.com/us/en/support...return-line-feed-in-qr-barcode-using-zpl.html

I would like more information (for example, change the font) but I do not have access to ask questions in the Zebra support forum

I attach the code.
Gracias amigo Bladimir, I'will do the tests!.
 

oparra

Well-Known Member
Licensed User
Hi @joaquinortiz

I have a Zebra iMZ320 printer that connects via BlueTooth. You are printing use B4A do not use ZPL commands.

Printing is something basic just text and does the line return, read here: https://www.zebra.com/us/en/support...return-line-feed-in-qr-barcode-using-zpl.html

I would like more information (for example, change the font) but I do not have access to ask questions in the Zebra support forum

I attach the code.
Check your example and why not send ZPL command ???

B4X:
Sub Process_Globals
    Private serial1 As Serial   <---
Firmware:
The IMZ series printers are compatible with the CPCL and ZPL programming languages. The ZPL programming language guarantees full compatibility with many other Zebra printers.

https://logismarketcl.cdnwm.com/ip/...ficaciones-tecnicas-zebra-imz-320-1171942.pdf
 

oparra

Well-Known Member
Licensed User
Use fonts;


Check the font name in memory.
If your printer has an LCD display you can choose List Fonts or send the following ZPL string to the printer to print a listing of available fonts:

^XA^WD*:*.FNT*^XZ

Will you print the list of fonts in memory?

B4X:
    Dim ZPLListFont As String
    ZPLListFont = "^XA^WD*:*.FNT*^XZ"
   
    Dim ZPLCommand() As Byte
    ZPLCommand = Conv.StringToBytes(ZPLListFont,"UTF8")
   
    StrOut.WriteBytes(ZPLCommand,0,ZPLCommand.Length)
    StrOut.Flush
 
Last edited:

Bladimir Silva Toro

Active Member
Licensed User
I did several tests with the ZPL commands from B4A until I finished blocking the printer, in the end a waste of time, I had to download an application from the Zebra website to be able to do a hardware reset.

And how did you do with all that?
 
Top