BT/Wifi Zebra printer connectivity

Is it possible to build an app that can send Zebra ZPL commands or a file of those to Zebra printers over Wifi or Bluetooth?

HI @Rkhan,

Were you able to find something that works for you? This seems like a very cool functionality to have for those businesses who use Zebra printers.

Hi @MiguelOrtiz
I picked this up last week to work on it again.
We purchased a wifi and BT enabled Zebra ZD421 printer. I am using the Zebra Printer for android mobile query option but it seems to not work.
When I broadcast to mac address, the query fails in console log with error stating undefined not found. If I switch it to paired device, the query is a success but nothing prints.
Thoughts?

This feature is exclusive to our Enterprise plan, which is why it’s not working for you. We apologize for the option being available for selection in the UI—that was an error on our part. Our engineers are currently working on removing it from other plans to avoid further confusion. If you’d like to explore whether our Enterprise plan suits your needs, you can book a demo here.

Do I understand you correctly, at the moment there are no ways to print on Zebra printers (zebra 2824 in my case) straight out of retool unless on enterprise plan?

Since Enterprise plan is not in the books at the moment I would really like to explore opportunities to print QR codes straight out of retool.

Specifics of my project involves working with biohazardous samples. And making users do extra steps involving pressing buttons on there device with contaminated hands.

That is correct, there is currently not an out-of-box solution outside of the Enterprise plan. However, if there is an API endpoint that could help you achieve this, you should be able to set it up manually.

I found this service:
https://developer.zebra.com/apis/sendfiletoprinter-model

this code works for me but there's a delay after 6 successful back to back prints. Only prints from android tablet though.

function sendToPrinter(zplCommand, printerIp) {
try {
const response = fetch(http://${printerIp}/printer/print, {
method: 'POST',
headers: {
'Content-Type': 'text/plain'
},
body: zplCommand
});

if (response.ok) {
  console.log('Print job sent successfully.');
} else {
  // Read and log the response text if not OK
  const errorText =  response.text();
  console.error('Failed to send print job. Status:', response.status, 'Response:', errorText);
}

} catch (error) {
console.error('Error:', error.message || error);
}
}

Thanks for the idea!
Unfortunately most of the scientists to use it are fruit company slaves.

I actually figured out formatting for native pdf export (took me a shaman drum and sage to do it) but I managed to create a printable pdf for a 1.25x1.25 zebra sticker NOT using ZPL.

Solution of a sorts I ended up with looks like this:

PDF Generator

![space](https://www......./transparent-150x150-1.png)
# {{ selectTestTypeQR.selectedLabel }} {{generateQRCode.data }}
||||
| ----------- | ----------- |----------|
|| ![{{generateQRCode.data }}]({{ qrCodeAIPFetchedImage.src }}) ||

Where qrCodeAIPFetchedImage.src is a 1000X1000 QR code fetched from here: https://api.qrserver.com/v1/create-qr-code/?size=1000x1000&data=

This ends you with a centered QR code in the middle of the pdf that prints nicely on my 2824. Word of caution: avoid Crome's built in print manager. It can't properly scale or zoom. Use os builti-n print service.

2 Likes