^XG
Recall GraphicPreview: partialDraws a bitmap that was downloaded to the printer once, instead of resending it with every label.
Syntax
^XGd:o.x,mx,myParameters
| Parameter | Description and accepted values | If omitted |
|---|---|---|
| d:o.x | Device, name and extension of the stored graphic, as in R:LOGO.GRF.Device, name and extension of the stored graphic | R:, .GRF |
| mx | Horizontal magnification, 1 to 10.1 to 10 — horizontal magnification | 1 |
| my | Vertical magnification, 1 to 10.1 to 10 — vertical magnification | 1 |
How it works
A logo does not change between labels, so sending it inside each one wastes the link. ~DG stores the bitmap on the printer under a name, and ^XG draws it — the format that follows carries a few dozen bytes where it used to carry hundreds of kilobytes.
The name is a device, a file name and an extension, as in R:LOGO.GRF. The device and the extension can be left off; R: and .GRF are what the printer assumes.
The two magnification parameters repeat dots rather than resampling, so a stored image doubles cleanly but never gains detail. Store the graphic at the size you mean to print it, and use magnification only for deliberate blocky scaling.
Example
~DGR:SQUARE.GRF,32,2,FFFFC003A0059009881184218241818181818241842188119009A005C003FFFF
^XA
^FO40,40^XGR:SQUARE.GRF,2,2^FS
^XZRendering…
How the preview on this site handles it
The preview keeps the graphics a ~DG in the same paste downloaded, and draws them with the requested magnification. A name this preview never saw a ~DG for draws nothing, because the image lives on the printer and not in the format.
Common mistakes
- Recalling a name that was never downloaded. The printer draws nothing and reports no error, which is why a missing logo is so hard to spot.
- Assuming the store survives a power cycle. R: is volatile memory; use E: for a graphic that has to outlive the reboot.
- Magnifying a small graphic to fill a space. Dots are repeated, so the edges go blocky — store it at the size you need.