hi,
you can print on Bluetooth Zebra printers ?
Thanks
you can print on Bluetooth Zebra printers ?
Thanks
You need to write a wrapper library for it with java to use it in b4acan you integrate it ?
Hi Gianluca, I developed some apps that work with Zebra printers via bluetooth. How can I help you?hi,
you can print on Bluetooth Zebra printers ?
Thanks
Hi Gianluca, I developed some apps that work with Zebra printers via bluetooth. How can I help you?
'
' In Starter Service
'
Dim o_Serial As Serial ' Objeto que contiene la comunicacion con los dispositivos
Dim o_Printer As TextWriter ' Objeto que contiene la informacion a imprimir
Dim o_Printer_Conected As Boolean ' Indica si la impresora está conectada
'
' In an activity, the user selects the printer to use from the bluetooth devices
'
Sub Activity_Create(FirstTime As Boolean)
'
' Se carga la Actividad
Activity.LoadLayout("ConnectPrinter")
'
If Starter.ParPrinterAddress <> "" Then
lcPrinterName = Starter.ParPrinterName
lcPrinterAddress = Starter.ParPrinterAddress
'
If Starter.o_Printer.IsInitialized = True Then
Starter.o_Serial.Connect(lcPrinterAddress) 'convert the name to mac address
End If
End If
End Sub
'
Sub cibutConectar_Click
Dim PairedDevices As Map
'
PairedDevices = Starter.o_Serial.GetPairedDevices
Dim l As List
l.Initialize
For i = 0 To PairedDevices.Size - 1
lcPrinterName = PairedDevices.GetKeyAt(i)
l.Add(lcPrinterName)
Next
'
Dim res As Int
res = InputList(l, "Seleccione la Impresora", -1) 'show list with paired devices
If res <> DialogResponse.CANCEL Then
lcPrinterAddress = PairedDevices.Get(l.Get(res))
lcPrinterName = l.Get(res)
Msgbox("Conectarse a: " & l.Get(res), lcPrinterAddress)
Starter.o_Serial.Connect(lcPrinterAddress) 'convert the name to mac address
End If
End Sub
'
Sub o_Serial_Connected (Success As Boolean)
'
If Success Then
ToastMessageShow("Impresora CONECTADA!!", False)
' TextWriter1.Initialize(Serial1.OutputStream)
Starter.o_Printer.Initialize2(Starter.o_Serial.OutputStream, "ISO-8859-1")
'Main.o_Printer.Initialize(Main.o_Serial.OutputStream)
Starter.o_Printer_Conected = True
Starter.ParPrinterName = lcPrinterName
Starter.ParPrinterAddress = lcPrinterAddress
'
Rutinas.Update_DB_Parametro ("SYS_IMPRESION_ACTIVA", "S")
Rutinas.Update_DB_Parametro ("PRINTER_NAME", Starter.ParPrinterName)
Rutinas.Update_DB_Parametro ("PRINTER_ADDRESS", Starter.ParPrinterAddress)
'
Starter.o_Printer.WriteLine(Starter.ParPrinterSets)
Starter.o_Printer.Flush
'
Msgbox("Impresora Conectada",Activity.Title)
Activity.Finish
Else
Starter.o_Printer_Conected = False
Log("Error conectando : " & LastException.Message )
Msgbox(LastException.Message, "Error conectando")
Starter.ParPrinterName = ""
Starter.ParPrinterAddress = ""
End If
End Sub
'
' Printing
'
Sub Imprime_Lectura
Dim lcLineasEnca() As String
Dim lcLineFeed As String
'
' Se verifica que esté inicializado el objeto de la Printer
If Starter.o_Printer.IsInitialized = False Then
Msgbox("La impresora NO está lista","Impresion de Envio")
Return
End If
'
'
lcLineasEnca = Regex.Split(CRLF, Starter.SysDireccionEmpresa)
lcLineFeed = Chr(10)
'
' Se asignan los SETS de la impresora
Starter.o_Printer.Write(Starter.ParPrinterSets)
Starter.o_Printer.Write(lcLineFeed)
'
' Se imprime el 1er Encabezado
Starter.o_Printer.Write(Starter.ParPNRHead01)
Starter.o_Printer.Write(Str_Format_Center(Starter.SysNombreEmpresa.Trim,48))
Starter.o_Printer.Write(lcLineFeed)
'
' Se imprime el 2do Encabezado (direccion de la Empresa)
For i = 0 To lcLineasEnca.Length - 1
Starter.o_Printer.Write(Starter.ParPNRDet01)
lcData = lcLineasEnca(i).Trim
lcData = lcData.Replace(CRLF,"")
Starter.o_Printer.Write(Str_Format_Center(lcData,48))
Starter.o_Printer.Write(lcLineFeed)
Next
Starter.o_Printer.Write(lcLineFeed)
'
'
' Se imprimen lineas en blanco para el Corte del Papel
For i = 1 To Starter.ParPNRNumLf
Starter.o_Printer.Write(lcLineFeed)
Next
'
Starter.o_Printer.Flush
End Sub
Don't waste time using those ZPL commands for the printer.
I ended up printing by BT on a Zebra imz320 printer using ESC / P commands
Hello @Martin Fernandez @Tico.13
Here is the example for zebra printers using ESC / P commands
Tests were performed on a Zebra iMZ320 printer
How to support printing barcode?Hello @Martin Fernandez @Tico.13
Here is the example for zebra printers using ESC / P commands
Tests were performed on a Zebra iMZ320 printer