I arrived at this script.
It works on a Gx420t with Factory defaults. It’s not exactly what I was aiming for,
but it’s pretty close.
^XA
^LT10 //Label
Top. Sets the top edge of the label (determined
experimentally)
^PW200 //Print Width. Sets the left edge of the label (determined
experimentally)
^LH10,15 //Label
Home. Offsets from left and top edges from
which fields positions are relative to.
^PR2 //Print Rate. 2 is the slowest setting
^MD30 //Media Darkness. Set to maximum darkness
^BY1 //Set the barcode bar-width to 1 dot … If
not set, the previous setting will be used.
The factory default is too big for this label.
^FO0,0^BCN,26,N,N,N,N^FD%s^FS
^FO0,30^A0,20,17^FD%s^FS
^FO0,50^A0,20,17^FD%s^FS
^XZ
Some key insights:
a)
the gx420t has lower resolution(203dpi) than the
gx430t (300dpi), so all positions and sizes needed to be determined again. Multiplying everything by 2/3 was insufficient…I
had to do it experimentally.
b)
Some settings persist between print jobs (examples:
^PW, ^BY). The printer maintains state
between jobs. Not all of the printers
state is visible through the web interface.
It’s important to develop and test your scripts against a printer with factory
default settings. To restore factory
defaults you must apply ‘restore default settings’ AND then power-cycle the
printer.