zplCloud

Printing

Graphics in ZPL - GRF images (^GF)

Photos, logos and rendered text become **monochrome bitmaps** in ZPL with the `^GF`

Graphics in ZPL - GRF images (^GF)

Photos, logos and rendered text become monochrome bitmaps in ZPL with the ^GF

command. zplCloud does this automatically (image → GRF, SVG → GRF, HTML/PDF → GRF).

Structure of ^GF

^GFa,b,c,d,data^FS
ParamMeaning
----------------
acompression: A = ASCII hex, B = binary, C = compressed (RLE)
btotal bytes of graphic (uncompressed)
ctotal bytes per row (uncompressed)
dbytes per row of the actual data (with compression)
datathe pixel data

Example (a 4×4 black square, ASCII hex):

^XA
^FO50,50^GFA,8,8,2,FFFFFFFF^FS
^XZ

Converting an image to GRF

1. Scale the image to the label resolution: widthPx = mm × DPI / 25.4.

2. Convert to monochrome (threshold or dithering - zplCloud uses Floyd–Steinberg

dithering for photos).

3. Pack rows: 1 bit per pixel, MSB first, pad each row to a byte boundary.

4. Encode with the C (compressed) variant to keep the ZPL small - 1:4 compression

is typical for barcodes, 1:2 for photos.

Tips

  • Keep GRF small: every dot costs bytes. A 600-dpi full-color photo can exceed

the printer memory - use 203 dpi or crop.

  • Zebra printers store GRF images in flash (~DYE:LOGO.GRF) - upload once, reference

by name instead of re-sending ^GF every label.

  • The zplCloud Zebra-Images tab manages stored GRF images on the printer.