matthiasbock / dymo-cups-drivers

Inofficial repository for Dymo's offical FOSS CUPS printer drivers for Linux
https://www.dymo.com/en-US/dymo-label-sdk-and-cups-drivers-for-linux-dymo-label-sdk-cups-linux-p--1
GNU General Public License v2.0
77 stars 22 forks source link

LabelManager 280 not printing #24

Open aleksas opened 1 year ago

aleksas commented 1 year ago

I've managed to compile and install the CUPS drivers using this repo. Ubuntu detects the LM280 printer when it is connected and powered on.

have set the default printer

lpstat -p -d
lpoptions -d LabelManager-280

and tried running

 lpr -o landscape -o PageSize=24_mm__1___Label__Auto_ docs/test.txt

Ubuntu shows that printing in progress, the finished but LM280 did nothing.

jkirk commented 1 year ago

@aleksas Did you make any progress?

I am running Debian/bullseye and also want to make the Dymo LabelManager 280 work. This is what I tried:

Via the CUPS webfronted the printer was shown:

screenshot_20230426T014412

but after adding the the printer an error was shown:

screenshot_20230416T105102

Did some research and found https://www.baitando.com/it/2017/12/12/install-dymo-labelwriter-on-headless-linux + computerlyrik/dymoprint#40 and checked the USB-ID:

  ❯ lsusb -d 0922:1005
  Bus 003 Device 066: ID 0922:1005 Dymo-CoStar Corp. DYMO LabelManager 280

I tried to find the right PPD file which this took quite a while, but I finally found one here: https://github.com/kelvie/dymo-cups-drivers/blob/main/ppd/lm280.ppd.

I took the file and put it in /usr/share/cups/model/lm280.ppd. After that I identified the location of the printer and set the new driver:

  ❯ lpstat -v dymo       
  device for dymo: usb://DYMO/LabelManager%20280?serial=[SNIP]

  ❯ sudo lpadmin -p dymo -v "usb://DYMO/LabelManager%20280?serial=[SNIP]" -P /usr/share/cups/model/lm280.ppd
  lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.

  ❯ sudo cupsenable dymo

  ❯ sudo cupsaccept dymo

First I tried this, where two "lines" were printed in the wrong orientation:

  ❯ echo Hello > test.txt
  ❯ lp -d dymo test.txt
  request id is dymo-1119 (0 file(s))

Here the only one single character was printed in the wrong orientation:

  ❯ echo H | lp -d dymo
  request id is dymo-1119 (0 file(s))

I tried a few days back. Today I came back to this issue and wanted to test your approach, so I went to find lpr which was missing on my system. I found several versions of that binary:

  ❯ apt-file search lpr | grep -e "bin/lpr$"
  cups-bsd: /usr/bin/lpr
  lpr: /usr/bin/lpr
  lprng: /usr/bin/lpr

But only the one in cups-bsd has the option "-o" (see: https://manpages.debian.org/bullseye/cups-bsd/lpr.1.en.html, which also took a while to find out). So I then installed cups-bsd and tried lpr:

❯ echo Test | lpr -P dymo -o landscape -o PageSize=24_mm__1___Label__Auto_

A label was "printed", but unfortunately there was nothing on it.

I then checked man lp(1) from cups-client (2.3.3op2-3+deb11u2) and found

   -o orientation-requested=4
        Prints the job in landscape (rotated 90 degrees counter-clockwise).

So I finally tried this, where finally a label was printed in the right orientation 💪🏾 :

❯ echo Test | lp -d dymo -o orientation-requested=4

All of the test labels are 112mm long. I need to find out how to make them shorter.