CAPS Universe documentation  1.0.4
All you need to know to be successful
Brother QL Label Printer Driver Development

Assumptions about the Print Head

  • most models of the QL printers have a print head with exact 720 dots, some (two models?) have more
  • these printers print at 300 DPI in the horizontal direction (fixed)
  • 720 dots at 300 DPI results into a width of 60.96 mm
  • the widest DK roll contains a paper with a width of 62 mm
  • the widest DK roll's transport tape width is 66 mm
Note
The following image implies the print head is centered inside the medium guard area (which isn't perfectly the case).
Guessed Printer Mechanics for Labels with 62 mm in width

If these assumptions are corrent, this implies for pre-cut labels (29 x 90 mm in this example):

Guessed Printer Mechanics for Labels smaller than 62 mm

Result:

  • for continous labels and pre-cut labels with 62 mm width, the left margin is about 0.2 mm and the right margin is about 0.8 mm
  • for continous labels and pre-cut labels smaller than 62 mm width, the right margin is 1.0 mm and really no margin at the left edge
Attention
This difference is important, since the filter pdftopdf will rotate your PDF 90 ° clockwise on demand. Thus you need 1 mm margin at the top of your document and no margin at the bottom (for landscape label -> portrait print). Refer how_to_setup_margins for details.

How does it work?

The printer prints "face down". E.g. you can't see what it prints until it cuts the tape and the label drops out. It always prints from right to left, because all media are inserted right aligned. All DK rolls increase in size to the left. Keep this in mind, when you design your label. The important edge (where everything starts) is the right edge.

Birds view to a QL printer
Attention
Since the printer prints from right to left, the first dot the print head can print on the medium comes with bit 7 in the first byte of line data.

How to check the capabilities of the printer?

-> USB IDs

sudo lsusb
[…]
Bus 001 Device 006: ID 04f9:209b Brother Industries, Ltd QL-800 P-touch Label Printer
[…]

-> 1284DeviceID <— capsprninfo

sudo capsprninfo id /dev/usb/lp0
MFG:Brother;CMD:PT-CBP;MDL:QL-800;CLS:PRINTER;CID:Brother LabelPrinter TypeE1;

How many bits does it use to decode the inserted cassette?

Bild zeigen, was ich vom Schacht gemacht habe.

-> status report behaviour <— ql-status

  • cassette reporting (cassette inserted or not, still 6 encoding bits or less?)
  • error reporting (cover open/close)

How to adapt the INI files to enable them or how to create one

-> which info must be availble

Copy one of the existing INI files (*.ini.in) and adapt its content whith the retrieved informationen: the [info], [ppd] and [id] section. Think about the listed options in the [features] section and try to adapt them as well. Description of their meaning can be found in Brother QL Label Printers User Manual And select the corresponding driver executable in section [drivers].

Add this new INI file to the list of files in src/brother/Makefile's EXTRA_DIST variable. And without the trailing .in into configure.ac's AC_CONFIG_FILES() block and into src/brother/Makefile's the driverdatabase_DATA variable.

And you might need to extend the driver itself as well. Check if the printer is already listed in the ql-printer-series.h and if not, add a new ID entry.

Open the corresponding ql*-series.c file and add the new (or already existing ID) to ql*_supported_printers array. Use the name for the .printer_name field you used in the new INI file in section [info], key device and map the new (or already existing ID) to it. And adapt the function ql*_driver_runtime_adaptions to accept this new printer variant as well.

How to test the new printer

-> print reference PDFs