I've been printing to a ZQ200 printer using Android (Java), but I want to print an image. But the GitHub demo program only works with ZPL Command, and I can't seem to find any resources to print a picture from CPCL Command. One thing that occurs to me is altering the printer language, but I am unable to do so. I called the Zebra Support team, who informed me that I cannot do so because the printer only supports ZPL. I'm stuck as a result; if you could, would you?
How To Print Images from Android(java) to Zq220 zebra printer using CPCL language// Expert user has replied. |
2 Replies
Use the Link-OS SDK for Android, which provides a GraphicsUtil class where you can find the printImage() API that converts the image file into bitmap data wrapped around with the CPCL commands and sends to the printer. To print on the ZQ220 printer, you would need to specify the printer language as CPCL when getting the printer instance. Without specifying the printer language as CPCL, the printImage() API would send the data as ZPL to the ZQ220. This wouldn't work, as the ZQ220 is a CPCL printer.
Here is the code snippet
I appreciate your help a lot, it saved me time