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

后端 未结 2 1319
无人及你
无人及你 2021-01-15 14:42

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!

2条回答
  •  遥遥无期
    2021-01-15 14:59

    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

提交回复
热议问题