printing multiple images with RW420 printer on Android

W Wouter Van Huffel 3 years 6 months ago
88 2 0

Hello,
 
We are building a project where we have to print multiple labels of patient details.
 
We are testing if we can print base64 converted images to the RW420 printer on an Android device over Bluetooth.
We have managed to print one label, but when we try to print multiple images in one row, it looks likes the device gets stuck.
 
We use the following code to print our images:
 
 
private void printImage(ZebraImageAndroid zebraimage, ZebraPrinter printer, Connection thePrinterConn) throws ConnectionException, ZebraIllegalArgumentException {
 
  Log.d(LOG_TAG, "Saving image to printer storage...");
 
  printer.storeImage("wgkimage.pcx", zebraimage, -1, -1);
 
  Log.d(LOG_TAG, "Printing image...");
 
  String cpcl = "! 0 200 200 ";
  cpcl += zebraimage.getHeight();
  cpcl += " 1\r\n";
  cpcl += "PW 750\r\nTONE 0\r\nSPEED 6\r\nSETFF 203 5\r\nON - FEED FEED\r\nNO - PACE\r\nJOURNAL\r\n";
  cpcl += "PCX 150 0 !

Please Register or Login to post a reply

2 Replies

Y Yanis Dalabiras

Hi Wouter, You did figure out the primary answer to the issue of sending the print jobs to wait.  Unfortunately there is no good way to know when the print jobs are complete on that model.  Newer printers have more methods to check statuses that indicate printing usage as well as much faster BT radio's.  Sorry.
Robin

W Wouter Van Huffel

After adding  a Thread.sleep(15000), we managed to successfully print all the images.
It looks like we are printing the images to fast for the RW420 to keep up.

Does the Android API somehow provide a method to check if the printer is done printing the label ?

CONTACT
Can’t find what you’re looking for?