pklaus / brother_ql

Python package for the raster language protocol of the Brother QL series label printers (QL-500, QL-550, QL-560, QL-570, QL-700, QL-710W, QL-720NW, QL-800, QL-810W, QL-820NWB, QL-1050, QL-1060N and more).
GNU General Public License v3.0
547 stars 157 forks source link

[solved] Support new papers with large media sizes on QL-1100 #88

Closed Jost-Philip closed 4 years ago

Jost-Philip commented 4 years ago

Hi! I just tried brother_ql on a QL1100 (the USB model without network). Using the older QL-1050-configuration seems to work fine for the narrower paper sizes, but printing on either DK-22246 (103mm endless) or DK-11247 (103x162mm labels) throws a media error.

The problem really seems to be that brother-ql is not aware of these rather new paper rolls and does not recognize the paper, rather than the printer not understanding the instructions.

Is there anything we can do about it?

The coding holes at the bottom of the reel are as following: (with O=hole, leaving the pin unpressed; X= solid surface, pushing down the sensing pin)

for DK-22246 endless: just the two side-by-side holes at the very back of the printer: back of printer OO _X _X _X _X front of printer

for the DK-11247 pre-cut labels: back of printer OO _X _X _O _X front of printer

Thanks!

Jost

Jost-Philip commented 4 years ago

Update: I found the label definitions in labels.py. From the look of things it seems that adding a new line to the label definitions should get me started.

  1. What is the agreed-upon method to determine the correct pixel dimensions for the media?
  2. is there anything else that needs to be done to get the media supported?

Thanks! Jost

Jost-Philip commented 4 years ago

Success!

to follow up, in the hopes that it might be useful to someone: I have managed to produce good results with the QL-1100 (USB-only variant, no network) on the paper media stated above with the below additions in models.py and labels.py. The tests were conducted on a stock Debian 10 linux on x86_64 architecture with the git version of brother_ql on python2.7 (which seems to be what ships with debian by default).

Getting the QL-1100 listed:

models.py: Model('QL-1100', (295, 35433), number_bytes_per_row=162, additional_offset_r=44),

Note that this is an exact copy of the lines already present for QL-1050 and 1060. I have tried playing with the minimum length and additional offset parameters, but these seem to be the optimal values. Most other values I tried worked too, but made the result worse.

For the endless roll DK-22246:

labels.py: Label("104", (104, 0), FormFactor.ENDLESS, (1227, 0), (1220, 0), -15 , restricted_to_models=['QL-1100']),

This prints directly from side edge to side edge, leaving practically no margin at all left and right, but when the paper roll is loaded and aligned carefully it will print the full width of the image without clipping. If you want a more conservative approach, go with

labels.py: Label("104", (104, 0), FormFactor.ENDLESS, (1227, 0), (1200, 0), -8 , restricted_to_models=['QL-1100']),

In both cases there will be approximately 2.5mm both at the top and at the bottom between the end of the printed image and the edge of the cut paper, which seems to be unavoidable.

For the Pre-cut labels DK11247 use:

labels.py:

Label("104x164",(104, 164), FormFactor.DIE_CUT, (1227, 1946), (1200, 1875), 0, restricted_to_models=['QL-1100']),

The printable pixel dimensions presented above align well with the standardized official "UPS Shipping label" (4.00x6.25 US-inch). They will leave small margins left and right. With these settings, the vertical centering is a little off. the printed image sits approximately 1mm below the center of the label, leaving approximately 3mm margin at the top and 0.5mm margin at the bottom. This was the best result I could achieve. The image is printed completely onto the label without clipping, and it is very similar to what the original Windows driver produces, so it might be a hardware calibration thing...