Android Question How to send ZPL commands through B4A

joaquinortiz

Active Member
Licensed User
Longtime 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.
 

TILogistic

Expert
Licensed User
Longtime 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.
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
Link:

 
Upvote 0

joaquinortiz

Active Member
Licensed User
Longtime 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.
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime 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;

 
Upvote 0

TILogistic

Expert
Licensed User
Longtime 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
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime 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.
 
Upvote 0

Bladimir Silva Toro

Active Member
Licensed User
Longtime User

Attachments

  • PrintBT.zip
    111.6 KB · Views: 314
Last edited:
Upvote 0

joaquinortiz

Active Member
Licensed User
Longtime 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!.
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime 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
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime 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:
Upvote 0

Bladimir Silva Toro

Active Member
Licensed User
Longtime 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?
 
Upvote 0
Top