philpem / printer-driver-ptouch

P-Touch PT-series and QL-series printer driver for Linux (under CUPS)
GNU General Public License v2.0
97 stars 25 forks source link

QL-600 support #27

Closed madscientist23333 closed 1 year ago

madscientist23333 commented 1 year ago

Hi,

happy customer of QL-600 here that would like to contribute something to the Linux driver :-). Bear with me, just new to github, no previous foomatic/CUPS driver coding experience. Hence my questions. Status quo: Printer quite useful with using the QL-650TD driver, but lacking some label formats.

1) Label formats As I found, the Windows driver features some really useful formats, the current Linux implementation does not list. Specifically for the QL-600, the current QL-650TD does not list [mm] x [mm] 62x29 17x87 29x42 39x48 52x29 60x86 12 dia (guess below is round labels) 24 dia 54 dia 12 (guess below is for custom length label) 29 38 50 54 62

Question: How can I spawn an instance of driver for the QL-600 (as a copy of QL-650TD)? What file needs to be edited to reflect the label format options?

2) Print density 300x300 DPI and 300x600 DPI I found, one can choose two different print densities in Windows driver. Hope we can simply ignore this as printing anything more than 300 DPI on a label does not make any sense to me.

Glad to get some advice to be able to bring us forward /Uwe

philpem commented 1 year ago

The page sizes are defined here: https://github.com/philpem/printer-driver-ptouch/blob/master/driver/ptouch-ql.xml

To create a new printer, you'd copy one of the files in https://github.com/philpem/printer-driver-ptouch/tree/master/printer and edit it accordingly. You probably want to take the QL-650TD one and copy it as QL-600. The tricky bit is going to be getting the correct IEEE1284 PnP strings. The rest is just going to be editing the text strings for that printer.

If you've never used Github before, you'll want to read up on how to use Git, forks, and pull requests. Essentially you create a copy of this repository (a fork) in your account, make your changes, then send a pull request to ask they be reviewed and merged into this one.

If you end up digging into the printer commands, the Brother reference manuals are here:

https://support.brother.com/g/s/es/dev/en/command/reference/index.html?c=eu_ot&lang=en&navi=offall&comple=on&redirect=on

Other than that, good luck, and if you have any more questions then please feel free to ask away! You'll need to do a bit of research on how the printing system works, but assuming you don't want to add 600DPI support, you'll only really need to change some XML files. If you do want to add 600dpi support, you'll need to learn how CUPS raster drivers work.

madscientist23333 commented 1 year ago

The page sizes are defined here: https://github.com/philpem/printer-driver-ptouch/blob/master/driver/ptouch-ql.xml

Hi Phil,

thanks for your quick response. A quick check showed an entirely different set of formats offered from the printer dialog compared to the reference above. I am using debian bookworm, containing debian-driver-ptouch v1.6.2. So I guess there is another source for label format definitions. At the same time I am challenged by a missing format-to-printer-model mapping. From the above, one could get the impression, all ptouch models support exact same label formats, which I highly doubt.

Do you have maybe another hint for me? /Uwe

philpem commented 1 year ago

You can't be using V1.6.2 because there isn't a V1.6.2!

The software you're using might be setting the label formats. It's possible to tell the driver to use a custom paper size and applications may opt to do this. In which case you need to define the label sizes in the software.

As far as I know the QL thermal-paper label printers all support the same label stock. The plastic carrier aligns the label stock correctly for that particular label size. It's the PT series which has variations in the supported label stock, because the different printers have different width print heads, and there are several types of label stock (TZ and TZE certainly, I think the others were TX and M?).

madscientist23333 commented 1 year ago

Regarding version, I took the information from this link: https://tracker.debian.org/pkg/ptouch-driver

Could well be I was confusing 1.6.2 with 1.6-2 - or it is a different version numbering scheme, the debian maintainer uses.

Very valid comment of yours regarding the label sizes, I found the plstic carrier encoding as well. For me this is just another reason to add the missing sizes to the above mentioned document for the QL series. Will take a turn on this soon. For the PT series I will not be able to contribute as I have acces to the QL-600 only.

Regarding the IEEE1284 PnP I found some reference in the https://github.com/philpem/printer-driver-ptouch/blob/master/printer/Brother-QL-650TD.xml, specifically <ieee1284>MFG:Brother;CMD:PT-CBP;MDL:QL-650TD;CLS:PRINTER;</ieee1284> given the information I collect from my system:

[98774.822856] usb 3-4: new full-speed USB device number 8 using xhci_hcd

[98775.041622] usb 3-4: New USB device found, idVendor=04f9, idProduct=20c0, bcdDevice= 1.00

[98775.041632] usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[98775.041635] usb 3-4: Product: QL-600

[98775.041637] usb 3-4: Manufacturer: Brother

[98775.041640] usb 3-4: SerialNumber: 000H2G99xxxx

[98775.045285] usblp 3-4:1.0: usblp10: USB Bidirectional printer dev 8 if 0 alt 0 proto 2 vid 0x04F9 pid 0x20C0

I would assume a valid IEEE1284 string for the QL-600 could look like <ieee1284>MFG:Brother;CMD:PT-CBP;MDL:QL-600;CLS:PRINTER;</ieee1284>

What do you think? /Uwe

madscientist23333 commented 1 year ago

One step after the other since it is first time working in github. I guess I managed to create a fork of the ptouch driver repository for me and created a new file for the Brother QL-600 to the best of my knowledge as a copy of the 650TD.xml. I am pretty confident even the IEEE1284 section is correct as I found some useful reference in Brothers source code.

https://github.com/madscientist23333/printer-driver-ptouch/blob/master/printer/Brother-QL-600.xml

If you would review the file and give me your okay, I would then try to create a pull request. Hope that is the way to go.

Looking forward to your advice. /Uwe

philpem commented 1 year ago

Merged! Thanks for the patch and the PR :)

It looks fine -- I assume it worked when you tested it?

philpem commented 1 year ago

Closed, no response from submitter in several months - assume this is sorted.

madscientist23333 commented 1 year ago

works like a charm, sorry for delay! Thanks! /Uwe