I have logos of various sizes. I am trying to center them on a label within a ^GB Is this possible or is there another way of doing this?
Code I tried: ^FO10,295,2^GB585,90^GFA,{items.manufacturer_logo}^FS
I have logos of various sizes. I am trying to center them on a label within a ^GB Is this possible or is there another way of doing this?
Code I tried: ^FO10,295,2^GB585,90^GFA,{items.manufacturer_logo}^FS
The ^GB command is used to draw boxes, not to print graphic fields and the parameters you put after the GB command are the width (585) and height (90) of the box.
Regarding the graphic field (^GF), there isn't a parameter in this field you can use to align to the center the image, so you need to manually enter the coordinates to center the field in the ^FO command, but if you're working on a software which can dinamically calculate the position of the fields, you can maybe do it automatically.
When it comes to design a label in ZPL language, my advice is usually to use zebradesigner, create the label and then export it using the "print to file" option you can find in the print view. You can download zebradesigner for free from here https://www.zebra.com/gb/en/support-downloads/printer-software/zebra-designer-3-downloads.html