Sign In
Products
ZPL ViewerBarcode GeneratorImage → ZPLZPL cheat sheetLabel DesignerTemplate Gallery
Developers
API QuickstartAPI ReferenceMCP ServerBulk GenerationWebhooksSDKs & ExamplesLimitsDirectPrint agent NewGitHub ActionVS Code extensionOn-Premise
Solutions
Logistics & ShippingE-CommerceERP & WMSManufacturingRetailHealthcare & LaboratoryAll solutions
Tools
ZPL Diagnostics HubZPL DebuggerSize & DPI AnalyzerDPI ConverterBarcode fit calculatorShipping Label AnalyzerFont InspectorOrientation DebuggerCalibration AssistantPrinter Compatibility CheckerBarcode Readability CheckerPrinter Language DetectorThermal Printer Test PackZPL ToolsEPL ToolsTSPL ToolsCPCL ToolsPrinter Language ConverterAll ToolsGuidesPricing
Language
EnglishTürkçeDeutsch
Home›All CPCL commands›EXPANDED-GRAPHICS

EXPANDED-GRAPHICS — Hex graphic (EG)

Draws a 1-bit image from hex data: width in BYTES (8 dots), height in dots, then x, y and the data. A 1 bit prints black (like ZPL ^GF, the opposite of TSPL BITMAP). The data is hex text, so line endings cannot cut it; it is also the safe way to print right-to-left text.

Engine status: Rendered

This command produces visible output in the preview.

Syntax

EG <width_bytes> <height> <x> <y> <hex>

Example

! 0 200 200 210 1
PAGE-WIDTH 576
EG 2 4 30 40 FFFF80018001FFFF
PRINT

Open this example in the preview →

Open the validator →

Rendered example

EG 2 4 30 40 FFFF80018001FFFF

Output of the example above in our renderer (203 dpi). Not verified on a physical printer.

Parameters

ParameterMeaning
width_bytesRow width in BYTES, 8 dots each; 1–208 in the preview
heightNumber of rows, in dots; 1–4064
x yTop-left corner of the image, in dots
hexHex data, two digits per byte; a 1 bit prints black, spaces are ignored

Common mistake

Giving the width in dots: the first field counts BYTES, so a 16-dot-wide image is EG 2 …, not EG 16 …; with 16 the preview expects 8× the data and leaves the missing part white.

All CPCL commands

! · PAGE-WIDTH · TEXT · TEXT90 · TEXT180 · TEXT270 · BARCODE · LINE · BOX · PRINT · FORM · CONTRAST · TONE · SPEED · JOURNAL · SETMAG · CENTER

All CPCL commands