Create GRF from BMP or HTML5 Canvas pixel data
How can I create a Zebra GRF im开发者_如何学Pythonage from HTML5 canvas pixel data or a monochrome BMP file using javascript? I can't find any information on the format of GRF files.
Here is the ZPL programming manual.
The ~DG command will tell you the format of the GRF format. Then it's just some math
You might have to convert this Java code to Javascript, but I came across this and make a command line java app to help. If you can go to the server at all, then you could probably just invoke this app through shell.
https://github.com/asharif/img2grf
精彩评论