zpl.tools
Media and sensors

~JG - Graphing Sensor Calibration

Calibrates the sensors and then prints a diagnostic label graphing the readings.

~JG runs the same calibration as ~JC — the label length, and the media and ribbon sensors — and then prints the result as a media sensor profile. It is the one command in this category that prints a page of its own.

Syntax

~JG

Support

Supportedparsed: full · state: full · rendered: full

Every documented parameter renders the same output Labelary produces.

The only command here that prints its own output. The renderer prints the graph as a page ahead of the format carrying the command, wherever in the format it sits, and counts it in X-Total-Count. A second ~JG prints a second page, each format carrying one prints its own, and ^PQ replicates the label alone. Labelary has no sensors to read, so the graph is empty: five numbered rules, a zero line and one sentence. Only the label size reaches the drawing, setting how long the rules are and how far apart. A ^PW ahead of the ~JG centers the page in the print window and cuts the rest away. A ^POI ahead of it turns the page over. Either one after the ~JG leaves the page alone (measured 2026-08-16). Only ~JG is a command. — not pinned by a test

Labelary renders this command.

Parameters

~JG takes no arguments.

Behavior

~JG takes no arguments and belongs to no format. Measured against Labelary on 2026-08-16:

  • ^XA~JG^FO100,100^A0N,60,60^FDCAL^FS^XZ returns X-Total-Count: 2, and the graph comes first. A ~JG after the field keeps that order.
  • ~JG with no format at all returns one page.
  • A second ~JG prints a second page, and each format carrying one prints its own. ^PQ replicates the label alone.

Labelary has no sensors to read, so it rules an empty graph instead: five hairlines numbered 100 down to 20, a heavy zero line along the bottom, and the sentence Labelary. No sensors. No media. No problem. across the middle. The renderer prints the same page. Only the label size reaches the drawing — the width sets how long the rules are, the height how far apart — and no sensor command changes a dot. A ^PW ahead of the ~JG centers the finished page in the print window and cuts the rest away; a ^POI ahead of it turns the page over. Either one after the ~JG leaves the page alone. ^JG is not a command and prints nothing.

Known issues

Tested behavior

Differences from the specification

Labelary against the ZPL II guide

Where Labelary — our compatibility target — behaves differently from the printed specification.

  • Labelary prints the sensor profile as a page of its own, ahead of the format. ^XA~JG^FO100,100^A0N,60,60^FDCAL^FS^XZ returns X-Total-Count: 2, the graph first, and a ~JG after the field keeps that order (measured 2026-08-16). The guide gives no page count, and no sensor stands behind the service, so the order and the empty graph are both Labelary's reading. The renderer follows it. — not pinned by a test

Example

A calibration graph requested ahead of a label. The graph is the first page:

~JG
^XA
^FO50,50^A0N,40,40^FDLabel on page two^FS
^XZ

Open in viewer