^GF Graphic Field

Images, graphics and stored formats ZPL caret command

Sends bitmap data inside the label format, straight into the printer's bitmap storage, as ASCII hexadecimal, binary or compressed binary.

Format ^GFa,b,c,d,data

^GF parameters

Parameters of ^GF
ParameterMeaningAccepted valuesDefault
acompression typep. 215

How the image data that follows is encoded.

  • AASCII hexadecimal, in the same form as the other download commands.
  • BBinary: the data is strictly binary (the guide's text says it follows the c parameter).
  • CCompressed binary: the host compresses the data with Zebra's algorithm, and the printer decompresses it straight into the bitmap.
A
bbinary byte countp. 215

The total number of bytes to be sent for the image, or the total number of bytes that follow the d parameter.

For an ASCII download, b should equal c. Out-of-range values are set to the nearest limit.

1 to 99999 bytes

The command is ignored if no value is given.

cgraphic field countp. 215

The total number of bytes that make up the graphic (width times height, in bytes).

The count divided by the bytes per row gives the number of rows. It describes the size of the image, not necessarily the size of the data stream.

1 to 99999 bytes

The command is ignored if no value is given.

dbytes per rowp. 215

How many bytes of the data make up one row of the image.

1 to 99999 bytes

The command is ignored if no value is given.

datadatap. 215

The image bytes.

The number of hexadecimal pairs must match the count c; any pairs after the count is reached are ignored. In ASCII data a comma pads the current line with 00 (white space), which shortens the data. ~DN, or any caret or tilde character, ends an ASCII download early.

ASCII hexadecimal: pairs of digits 00 to FF, two digits per image byte; CR and LF may be inserted for readability. Binary: raw bytes, with control prefixes ignored until all the bytes the graphic needs have been sent.

A value is required.

^GF notes and gotchas

  • Note

    The command loads graphic data directly into the printer's bitmap storage area, and the data can be placed anywhere in the bitmap space. The guide's examples position it with ^FO.

    pp. 215, 216
  • Note

    The guide describes the 00 pad byte as white space. For ~DG data it says 0 bits are white dots and 1 bits are black. The ^GF entry itself does not spell out bit values for ordinary data.

    pp. 176, 215
  • Note

    The guide's two examples send 8,000 bytes in 80 bytes per row, one in ASCII form and one in binary form.

    p. 216
  • Guide issue

    The entry says the command follows the conventions of any other field, 'meaning a field orientation is included', but the Format line ^GFa,b,c,d,data has no orientation parameter. The guide does not explain this.

    p. 215
  • Guide issue

    The text for c says the graphic bytes are 'sent as parameter d', the text for b says 'bytes that follow parameter d', and the descriptions of compression types B and C say the data is sent 'after the c parameter'. Parameter d is the bytes per row, and the data is the last parameter. The record treats all of these as references to the data.

    p. 215

^GF example

example.zplZPL
^XA
^FO30,30^GFA,8,8,1,8040201008040201^FS
^XZ

An ASCII-hex bitmap one byte wide and eight rows high: 8 bytes in total (b and c are both 8), 1 byte per row (d). The 16 hexadecimal digits are the eight rows; the set bits run along a diagonal of the 8 by 8 grid.

Guides that use ^GF

BarcoderX is a .NET SDK for thermal labels and barcodes. See how it prints and exports labels.

Source Zebra, ZPL II, ZBI 2, Set-Get-Do, Mirror, WML Programming Guide, P1134473-11EN Rev A, 2026/07/05, pages 175 to 177, 201, 204, 215, 216, 373.

Written by BarcoderX in its own words. Checked against the guide on 2026-11-14.

ZPL and ZPL II are trademarks of Zebra Technologies Corporation. This reference is written by BarcoderX in its own words from Zebra's published programming guide. BarcoderX is an independent product and is not affiliated with, endorsed by or sponsored by Zebra Technologies.