The following information is provided as is, and the authors take no responsibility for the correctness.

Brother P-Touch

The Brother P-Touch label printers use their own page description language, here called “Brother P-Touch”

Reference

This reference information is based on work from

There's now an official Reference QL Series, PT-E550w/P750w,PT-9500PC

Implementation examples: ptprint.rb - very simple and transparent in ruby, in perl, blabel in perl

See preview of your data to be printed online.

Introduction

Each invocation of this filter is one job, containing a number of pages, each page containing a number of lines, each line consisting of a number of pixel bytes.

Output consists of job-related printer initialisation commands, followed by a number of pages, each page consisting of page-related commands, followed by raster line data. Each page is followed by a finish page or (after the final page) finish job command.

The following printer command language, printer, and tape information has been deduced from many sources, but is not official Brother documentation and may thus contain errors. Please send any corrections based on actual experience with these printers to the maintainer.

Ascii Hex Description
ESC @ 1b 40 Initialise Clear print buffer
ESC i D # 1b 69 44 ## Set print density bit 0-3: 0=no change, 1-5=density level
ESC i K # 1b 69 4b ## Set half cut bit 2: 0=full cut, 1=half cut
ESC i R ## 1b 69 52 ## Set transfer mode ##: ?: 1=?
ESC i S 1b 69 53 Send printer status
M ## 4d ## Set compression ##: Compression type: 2=RLE
Ascii Hex Description
ESC i A ## 1b 69 41 ## Bit 0: Enable cutter (observed on QL-560)
ESC i c #1 #2 #3 NUL #4 1b 69 63 #1 #2 #3 00 #4 Set width & resolution
360x360DPI: #1 #2 #4 = 0x84 0x00 0x00\\360x720DPI: #1 #2 #4 = 0x86 0x09 0x01
#3: Tape width in mm
ESC i M # 1b 69 4d ## Set mode bit 0-4: Feed amount (default=large): 0-7=none, 8-11=small, 12-25=medium, 26-31=large
bit 6: Auto cut/cut mark (default=on): 0=off, 1=on
bit 7: Mirror print (default=off): 0=off, 1=on.
(note that it seems that QL devices do not reverse the data stream themselves, but rely on the driver doing it!)
ESC i z #1 #2 #3 #4 #5 #6 NUL NUL NUL NUL (1b 69 7a #1 #2 #3 #4 #5 #6 00 00 00 00) Set media & quality
#1, bit 6: Print quality: 0=fast, 1=high
#2, bit 0: Media type: 0=continuous roll, 1=pre-cut labels
#3: Tape width in mm
#4: Label height in mm (0 for continuous roll)
#5 #6: Page consists of N=#5+256*#6 pixel lines
ESC i d #1 #2 (1b 69 64 #1 #2) Set margin Set size of right(?) margin to N=#1+256*#2 pixels
FF (0c) Form feed Print buffer data without ejecting.
SUB (1a) Eject Print buffer data and ejects.
Ascii Hex Description
G #1 #2 [data] 47 #1 #2 [data] Send raster line data consists of N=#1+256*#2 bytes of RLE compressed raster data.
Z 5A Advance tape Print 1 empty line
g #1 #2 [data] 67 #1 #2 [data] Send raster line data consists of N=#2 bytes of uncompressed raster data.
ESC * ' #1 #2 [data] 1B 2A 27 #1 #2 [data] Bit image printing (BIP) Print N=#1+256*#2 lines of 24 pixels; data consists of 3*N bytes
Bytes Description
#1 [data] #1 >= 0: Print uncompressed data consists of 1+#1 uncompressed bytes
#1 #2 #1 < 0: Print compressed #2 should be printed 1-#1 times

#1 is represented as a 2-complement signed integer.

Printer model characteristics

The following table lists for each model what kind of cutter it has (manual, auto, half cut), what kind of pixel data transfer mode it requires, its resolution, number of print head pixels, number of bytes of pixel data that must be transmitted per line (regardless of actual tape width!), and what kinds of tape it can take.

For PC models, pixel data must be centered, so narrow tapes require padding raster data with zero bits on each side. For QL models, labels are left-aligned, so pixel data must be right aligned, so narrow tapes require padding raster data with zero bits at the end.

For PC-PT, only the central 24 pixels (= 3,4mm!) can be used for pixel-based graphics. It might be possible to print several strips of 24 pixels side-by side by issuing CR and line-positioning commands.

Model Cutter Xfer DPI Pixels Bytes Tape
QL-500 manual ULP 300 720 90 DK12-62mm
QL-550 auto ULP 300 720 90 DK12-62mm
QL-560 auto ULP 300 720 90 DK12-62mm
QL-650TD auto ULP 300 720 90 DK12-62mm
PT-PC auto BIP 180 128 3 TZ6-24mm
PT-18R auto RLE 180 128 16 TZ6-18mm
PT-550A auto RLE 180 128 16 TZ6-36mm
PT-1500PC manual RLE 180 112 14 TZ6-24mm
PT-1950 auto RLE 180 128 16 TZ6-18mm
PT-1950VP auto RLE 180 112 14 TZ6-18mm
PT-1960 auto RLE 180 96 12 TZ6-18mm
PT-2420PC manual RLE 180 128 16 TZ6-24mm
PT-2450DX auto RLE 180 128 16 TZ6-24mm
PT-2500PC auto RLE 180 128 16 TZ6-24mm
PT-2600 auto RLE 180 128 16 TZ,AV6-24mm
PT-2610 auto RLE 180 128 16 TZ,AV6-24mm
PT-3600 auto/half RLE 360 384 48 TZ,AV6-36mm
PT-9200DX auto/half RLE 360 384 48 TZ6-36mm
PT-9200PC auto/half RLE 360 384 48 TZ6-36mm
PT-9400 auto/half RLE 360 384 48 TZ6-36mm
PT-9500PC auto/half RLE 360
360×720
384 48 TZ,AV6-36mm
PT-9600 auto/half RLE 360 384 48 TZ,AV6-36mm

Tape characteristics

Tape Width Print Area Margins DPI
62 mm 61.0 mm 720 pixels 0.5 mm 300
36 mm 27.1 mm 384 pixels 4.5 mm 360
24 mm 18.0 mm 128 pixels 3.0 mm 180
18 mm 12.0 mm 85 pixels 3.0 mm 180
12 mm 8.0 mm 57 pixels 2.0 mm 180
9 mm 6.9 mm 49 pixels 1.0 mm 180
6 mm 3.9 mm 28 pixels 1.0 mm 180

Notes

  • Pixels bytes sent are printed from right to left, with bit 7 rightmost!
  • Bit image printing (BIP) using “ESC * ' #1 #2 …data…” probably only works for the PT-PC model.
  • QL Printer documentation might state that the print area is less than 61mm, which is probably to ensure that printed pixels stay within the tape even if it is not precisely positioned. The print head really IS 720 pixels.
  • PT-18R cannot handle more information after the image data and the final formfeed or eject byte. Any more information after '0c' or '1a' is taken as the start of a new job so it keeps waiting for more data.

 
formats/page_description_languages/brother_p-touch.txt · Last modified: 2015/07/28 09:08 by xsouku04
 

All text is available under the terms of the GNU Free Documentation License (see Copyrights for details). Disclaimers

Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki