Just install ZebraDesigner, create a blank label, insert a image object to the template and add the required logo image. Image2grf(r"pallet_label_icons.png", rotate = 90)Įdit: I updated the code above to use my new conversion method, which produces better resolution GRF files TotalBytes = nibblesPerRow * len(image_asArray)įormat(int("".join(row), 2) ^ 0xF, "x")ĭata = "~DGimage," + str(totalBytes // 2) + "," + str(nibblesPerRow // 2) + "," + hexStringįileHandle = open(r"f", "w") Image_asArray = np.asarray(np.asarray(image, dtype = 'int'), dtype = 'str').tolist() Image = image.rotate(rotate, expand = True) Size = (int(size * image.width), int(size * image.height)) Image = Image.open(filePath).convert(mode = "1") from PIL import Image, ImageOpsĭef image2grf(filePath, width = None, height = None, rotate = None): Here is another option: I created my own image to. GRF file from an original image what should be the type of this file (.BMP. The image I printed is a 40px x 40px image.Īlso, if I have to make a. I am also wondering what are the best dimensions I should use given the fact that I need a small image ~5mm x 5mm to be printed on the labels. BMP picture, downloading it and printing a test page.īut until now, I couldn't do it using ZPL instructions. I could print the logo on the labels using the "Zebra Setup Utilities", by "Downloading Fonts and Graphics", choosing any available. GRF file is an ASCII HEX representation of a graphic image. GRF file extension is mentioned many times in the manual. It looks like I have to "load" the image into the printer first (in a so-called "storage area"/DRAM?) and then print it. I have been reading and trying a few things from the ZPL manual but I don't really understand how it works and couldn't find a working example. I would like to know the steps I should follow to do this. I would like a logo (small ~ 5mm x 5mm image) to be printed on the upper left corner of the label. I would like send ZPL instructions to a Zebra printer (GK420t for now).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |