Published:
You send a logo to a TSC printer with BITMAP and get
a solid black rectangle, or a black block with your logo as a white
silhouette. The command is fine. The bits are upside down.
The TSC TSPL/TSPL2 programming manual's own BITMAP example
prints an arrow, and the rows that are all 00 bytes are the
arrow's solid black bar. So in TSPL a 0 bit prints a dot and a 1 bit
leaves the paper white. ZPL's ^GF and most image
libraries use the opposite convention: 1 is black. Data converted with a
ZPL habit, or taken straight from a 1-bit image library, therefore prints
as its own negative. A mostly white logo becomes a mostly black box.
b ^ 0xFF) before sending.width × height
bytes. Sending it as hex text, or through a channel that rewrites
0D/0A bytes (a text-mode file copy, some serial
drivers), shifts every following byte.SIZE 50 mm, 25 mm
GAP 3 mm, 0 mm
CLS
BITMAP 20,20,13,60,0,<780 raw bytes>
PRINT 1
Parameters: x, y, width in bytes, height in dots, mode, data. Mode
0 overwrites the area, 1 ORs the image onto what
is already drawn, 2 XORs it.
The TSPL viewer draws BITMAP
with the manual's bit meaning, so an inverted image shows up as a black box
on screen too. For binary data, send the job file as raw bytes to the
render API (POST /v1/tspl/render); a text box cannot carry
arbitrary bytes. To skip the conversion entirely, upload the image to
image to ZPL, choose TSPL (BITMAP)
as the output language, and you get a ready binary job with the bits,
padding and byte width already right.
Our rendering follows the TSC manual; it has not been checked against every TSC firmware. Print one label before a large batch.
In TSPL a 0 bit prints a dot and a 1 bit stays white, the opposite of ZPL ^GF and most image libraries. Data prepared the ZPL way prints as its negative, so a mostly white logo becomes a mostly black box. Invert every byte before sending.
In bytes: 8 dots per byte, rounded up. A 100-dot wide image is 13 bytes wide, and the unused padding bits at the end of each row must be 1 (white) in TSPL.
Mobile printer labels rendered in the browser: the session header that controls everything, the findings that matter, and what is not drawn.
Previewing and debugging TSPL without a printerRender TSPL in the browser, read the diagnostics it produces, and know which commands a preview deliberately does not draw.
Arabic text prints reversed or broken in CPCLArabic or Hebrew sent with CPCL TEXT can print reversed or with disconnected letters. Why it happens and three ways to print right-to-left text.
EPL label content shiftedAn EPL label that prints shifted sideways is usually a printer setting, not the form: q width, the R reference point, and stored forms that inherit both.