Print BMP with ZPL

被刻印的时光 ゝ 提交于 2020-01-22 15:10:30

问题


How can I use ZPL II to print a bitmap (BMP) image?

I used ~DY to download the BMP to the printer:

~DYR:PRINT,B,B, <size> , <width> , <data>

I am using PHP to send raw data to the printer, so <> variables are coming from that script. Using the printer's diagnostic utility I verified that the file was successfully downloaded using that command. I was also able to print that BMP file using TSPL, a different printer language that this particular printer also supports in addtion to ZPL, so I know that the BMP was written correctly.

I tried using the following code to then print the BMP:

^XA
^FO0,0^XGR:PRINT.BMP,1,1^FS
^XZ

But it only spits out a blank label.

What am I doing wrong?


回答1:


Try this instead:

^FO0,0^IMG:PRINT.BMP^FS

Good luck.




回答2:


After my information you canNOT use .BMP extension, thus it is set to a fixed value, which is .GRF

Check this as well -> http://www.servopack.de/support/zebra/ZPLII-Prog.pdf




回答3:


You can use ZebraNet Bridge to convert your BMP (or PNG, or JPG, etc) to GRF format

http://www.zebra.com/id/zebra/na/en/index/drivers_downloads/utilities/other_utilities/zebranet_bridge_enterprise.html




回答4:


Here is the link to download the Zebra Setup Utilities:

https://www.zebra.com/us/en/support-downloads/eula.-227178c9720c025483893483886ea54dde80fe8dccd74087deac0002665121f1b906a97e0267e4c60078aef6cd4a559.html

Once I launched the app I pressed the "Install New Printer" button and installed a random printer.

After installing the printer, select the printer and press the "Download Fonts and Graphics" button. This will install the "ZebraDesigner Fonts and Graphics Downloader".

You can use this utility to convert bitmaps to zebra bitmaps.

I am following these directions now. I'll let you know if it works.

https://km.zebra.com/kb/index?page=content&id=SO7892

The software works, but I still can't convert a .bmp to an actual ZPL bitmap.




回答5:


This site provides a ZPL viewer that includes the ability to import an image. When imported, the image is converted to ZPL and the resulting code is provided.

http://labelary.com/viewer.html

Obviously this will only work for static images.



来源:https://stackoverflow.com/questions/7083180/print-bmp-with-zpl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!