trialinfo / ptouch-driver

CUPS/Foomatic driver for Brother P-touch and QL label printers
GNU General Public License v2.0
8 stars 1 forks source link

PT-E550W #1

Closed sim0nx closed 4 years ago

sim0nx commented 4 years ago

Hi,

I see that PT-550A is supported. I am not sure how different PT-550W is but would it be possible to add support for that one as well please ? :-) (for usb printing)

andreas-gruenbacher commented 4 years ago

Does the printer work when you manually select PT-550A as the driver? If so, all that's needed is to add a PT-550W printer description file.

sim0nx commented 4 years ago

Does the printer work when you manually select PT-550A as the driver? If so, all that's needed is to add a PT-550W printer description file.

I wanted to try that but I actually fail to compile this repo:

opt/Brother-PT-Margin.xml: Duplicate id opt/Brother-PTQL-Margin
make[1]: *** [Makefile:1039: generated/stamp-h1] Error 255
make[1]: Leaving directory '/home/xxxx/work/ptouch-driver'
make: *** [Makefile:394: all] Error 2

When I use the driver from https://github.com/philpem/printer-driver-ptouch (via debian buster package) with PT-E550A, when printing the test page it just feeds an empty label seemingly endlessly.

Trying to print a label with glabel doesn't work either, it just keeps feeding material without printing anything.

andreas-gruenbacher commented 4 years ago

Oops, sorry, I've fixed that now. Please try printing an actual label (portrait or landscape should both work) instead of the standard test page.

sim0nx commented 4 years ago

Oops, sorry, I've fixed that now. Please try printing an actual label (portrait or landscape should both work) instead of the standard test page.

Thanks, compilation works now, install doesn't though:

 /bin/mkdir -p '/usr/local/lib/cups/filter'
  /usr/bin/install -c rastertoptch '/usr/local/lib/cups/filter'
 /bin/mkdir -p '/usr/local/share/foomatic/db/source/driver'
 /usr/bin/install -c -m 644 generated/driver/ptouch-pt.xml generated/driver/ptouch-ql.xml '/usr/local/share/foomatic/db/source/driver'
 /bin/mkdir -p '.'
  /usr/bin/install -c ptexplain '.'
/usr/bin/install: 'ptexplain' and './ptexplain' are the same file
make[1]: *** [Makefile:494: install-noinst_ptexplainPROGRAMS] Error 1
make[1]: Leaving directory '/home/georges/work/ptouch-driver'
make: *** [Makefile:887: install-am] Error 2

can you have a look please?

andreas-gruenbacher commented 4 years ago

It looks like your version of automake doesn't handle the noinst_ prefix (build but don't install) in Makefile.am correctly. The version I have installed here is 1.16.1, which seems to work. Can you try the following patch? If that doesn't work, ptexplain can simply be removed from Makefile.am for now.

noinst.patch.gz

sim0nx commented 4 years ago

It looks like your version of automake doesn't handle the noinst_ prefix (build but don't install) in Makefile.am correctly. The version I have installed here is 1.16.1, which seems to work. Can you try the following patch? If that doesn't work, ptexplain can simply be removed from Makefile.am for now.

I am on Debian Buster and also have automake 1.16.1 hmm.

noinst.patch.gz

The patch worked, thank you!

The PT-E550W profile now works for printing !!!! woohoo That is really cool, thank you!

sim0nx commented 4 years ago

Quick question, when printing a PDF I can correctly select the tape format (e.g. 18mm), though it has a fixed height of 100m. The output is correctly printed, but indeed on a 100mm label, instead of in this case 26mm. Do you know how I can fix this ? (the file is 18mmx26mm)

sim0nx commented 4 years ago

Quick question, when printing a PDF I can correctly select the tape format (e.g. 18mm), though it has a fixed height of 100m. The output is correctly printed, but indeed on a 100mm label, instead of in this case 26mm. Do you know how I can fix this ? (the file is 18mmx26mm)

I manage to do it correctly printing a PDF, but the output is always blank (no embedded fonts, text is rasterized, PDF v1.4). Converting the PDF to PNG, the output works, but the label is 100mm wide and the label (26mm) is centered on it.

hmm

sim0nx commented 4 years ago

Quick question, when printing a PDF I can correctly select the tape format (e.g. 18mm), though it has a fixed height of 100m. The output is correctly printed, but indeed on a 100mm label, instead of in this case 26mm. Do you know how I can fix this ? (the file is 18mmx26mm)

I manage to do it correctly printing a PDF, but the output is always blank (no embedded fonts, text is rasterized, PDF v1.4). Converting the PDF to PNG, the output works, but the label is 100mm wide and the label (26mm) is centered on it.

hmm

To answer my own question, the PDF must not be 18mm, but smaller. Then it works perfectly :-)

andreas-gruenbacher commented 4 years ago

There doesn't seem to be a way to define roll-fed media in printer definition files that applications would understand and handle correctly, so the only thing we can do is define pages with an arbitrary length (or width, depending on the orientation you're looking at). With that, when you define a page with a length that differs from the predefined page size, some applications will send that page to the printer as is, while others will fill the page up to the predefined page size. OpenOffice seems to be in the latter category. You can try printing to a PDF or PS file and then print that file.

sim0nx commented 4 years ago

Thank for the clarification. That helps. I noticed that cups support "custom" for page size. That could maybe solve this issue? There seems to be a difference between submitting a PDF and anything else on the cups side as doing so with "lp" results in the same behavior. PDF prints fine... PNG prints ze 100mm label. So my guess is that a PDF is handled differently on the backend.

Regarding my initial question, could you please add a PT-E550W printer description? :-)

andreas-gruenbacher commented 4 years ago

Regarding my initial question, could you please add a PT-E550W printer description? :-)

Sure. I've pushed a getusbprinterid script to the repository; what DeviceID does it report (./getusbprinterid /dev/usb/lp0 or similar)?

sim0nx commented 4 years ago

Whenever I connect the device, the node in /dev gets immediately removed and I don't see how I can prevent that.

[19971.962103] usb 1-2.4.1: New USB device found, idVendor=04f9, idProduct=2060, bcdDevice= 1.00
[19971.962105] usb 1-2.4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[19971.962107] usb 1-2.4.1: Product: PT-E550W
[19971.962108] usb 1-2.4.1: Manufacturer: Brother
[19971.962109] usb 1-2.4.1: SerialNumber: xxxxxxx
[19971.967084] usblp 1-2.4.1:1.0: usblp3: USB Bidirectional printer dev 16 if 0 alt 0 proto 2 vid 0x04F9 pid 0x2060
[19972.092180] usblp3: removed

Is there no entry in /sys where I could get that information from ? Or do you have an idea how I can execute the code without /dev entry ?

Note that the printer still works.

andreas-gruenbacher commented 4 years ago

Whenever I connect the device, the node in /dev gets immediately removed and I don't see how I can prevent that. [...] Is there no entry in /sys where I could get that information from ? Or do you have an idea how I can execute the code without /dev entry ?

Note that the printer still works.

Maybe udev or cups are causing this to happen. The fact that the printer still works surely means that a different device inode is used to access it.

Is this the type of printer you have? Then it's relatively close to PT-P700, which I have access to and which is a long way from PT-550A. If the printer description I've just added works for you, we should be fine for now.

sim0nx commented 4 years ago

Whenever I connect the device, the node in /dev gets immediately removed and I don't see how I can prevent that. [...] Is there no entry in /sys where I could get that information from ? Or do you have an idea how I can execute the code without /dev entry ? Note that the printer still works.

Maybe udev or cups are causing this to happen. The fact that the printer still works surely means that a different device inode is used to access it.

I couldn't find a different device inode and wasn't able to disable that udev trigger.

Is this the type of printer you have? Then it's relatively closer to PT-P700, which I have access to and which is a long way from PT-550A. If the printer description I've just added works for you, we should be fine for now.

Nope it is this model: https://support.brother.com/g/b/manualtop.aspx?c=eu_ot&lang=en&prod=e550weuk

Thank you

andreas-gruenbacher commented 4 years ago

Fair enough. Is the printer recognized automatically by the driver now though?

sim0nx commented 4 years ago

Fair enough. Is the printer recognized automatically by the driver now though?

I just tested it and yes it is! Thank you

andreas-gruenbacher commented 4 years ago

Ok, thanks. I've got one pending change that will also affect this printer, so let's please keep this issue open until we know that change is working as well. I'll let you know as ASAP.

andreas-gruenbacher commented 4 years ago

I've just pushed an update that enables the print information command on that printer. Things should continue to work as before; could you please check?

In addition, there's a new "Only print on labels of matching size" flag; please see the commit message.