^XG Recall Graphic

Images, graphics and stored formats ZPL caret command

Prints a graphic that is stored in printer memory, optionally magnified on each axis by a factor from 1 to 10.

Format ^XGd:o.x,mx,my

^XG parameters

Parameters of ^XG
ParameterMeaningAccepted valuesDefault
dsource device of stored imagep. 373

Where to look for the stored image.

  • R:Storage location R:.
  • E:Storage location E:.
  • B:Storage location B:.
  • A:Storage location A:.

The printer searches in the order R:, E:, B:, A:.

oname of stored imagep. 373

The name the image was stored under.

1 to 8 alphanumeric characters.

UNKNOWN

If no name is given, UNKNOWN is used.

xextensionp. 373

The file extension of the stored image.

The guide prints the label as 'extension l'; the entry lists no value l, only the fixed value .GRF.

.GRF (fixed).

Not stated in the guide.

mxmagnification factor on the x-axisp. 373

How many times wider the image is printed.

1 to 10

1
mymagnification factor on the y-axisp. 373

How many times taller the image is printed.

1 to 10

1

^XG notes and gotchas

  • Interaction

    The guide's example places each recall with ^FO before the ^XG, using a different magnification for each one.

    p. 373
  • Note

    The command is used inside a format to merge graphics, such as logos, with text. One image can be recalled and resized as many times as needed in the same format, and other images and data can be added.

    p. 373
  • Note

    The ^IM entry says it is identical to ^XG apart from having no sizing parameters, and that the stored object must sit on an 8-, 16- or 32-bit boundary for its faster formatting; its extension is listed as .GRF or .PNG while ^XG lists .GRF.

    pp. 248, 373
  • Guide issue

    The x parameter is titled 'extension l' in the printed entry. The entry gives no meaning for the trailing l and lists only the fixed value .GRF, so the record treats the l as a stray character.

    p. 373

^XG example

example.zplZPL
~DGR:RING.GRF,8,1,3C4281818181423C
^XA
^FO30,30^XGR:RING.GRF,2,2^FS
^FO30,120^XGR:RING.GRF,5,3^FS
^XZ

The first line stores an 8 by 8 dot image named RING.GRF in R: (8 bytes, 1 byte per row). The format then recalls it twice: once magnified 2 by 2 and once magnified 5 on the x-axis and 3 on the y-axis, each at its own position.

Guides that use ^XG

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, 176, 201, 204, 248, 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.