javaimagezebra-printerszpl

How to use the ^DG command send image to a zebra printer in java?


Is anyone know how to convert a image(such as *.bmp files) to HEX string in java,so the HEX string can used in the ^DG command(one of command in zpl).thanks!


Solution

  • It's not easy. You have to convert the image to 1-bit per pixel b/w, and then calculate the size including the bytes per row, and then properly form up the parameters of the ~DG command to store it.

    Or...

    Zebra provides an API to convert images to GRFs (Zebra internal image type). There are a bunch of developer demos in the package, including a demo on how to print/store an image as a GRF on your printer

    Zebra Link-OS SDK download

    Hope this helps