michaelrsweet / lprint

A Label Printer Application
https://www.msweet.org/lprint
Apache License 2.0
219 stars 29 forks source link

Support for xprinter 420B #113

Closed Nachtpfoetchen closed 1 month ago

Nachtpfoetchen commented 6 months ago

Hello, I have trouble to get my xprinter 420B running. According to the ppd of the printer *TscAttr tscLanguage: TSPL2 I thought it might be possible to get it going with lprint. you can find the whole ppd file here. And the full driver here it is called label printer driver. Your project looks great and maybe it would be possible to get this printer going :)

michaelrsweet commented 5 months ago

OK so the Linux driver is just a shell archive for a binary driver; nothing much to work with there... The PPD does show the printer using "TSPL2" in the command set field for the 1284 device ID, which will match the TSPL2 driver that ships in the next LPrint release.

Have you tried using the current LPrint master code?

Nachtpfoetchen commented 5 months ago

Thank you for the answer. I haven't tried the master code of lprint so far. I will try it and report back to here. It would be great to get this printer working again :)

Nachtpfoetchen commented 5 months ago

So i got the LPrint master code going (I had to comment the check for the cups version in the configure file). Unfortunately i wasn't able to find a TSPL2 driver in it. And the TSPL_300dpi didn't work, as well as letting it on automatic in the web interface.

Thats how it shows up in the terminal:

lprint server -o server-name=loaclhost -o server-port=3012 -o auth-service=cups
Xprinter XP-420B (USB) (usb://Xprinter/XP-420B?serial=S420BBH214220049;MFG:Xprinter;CMD:TSPL2;MDL:XP-420B;CLS:PRINTER;) -> (null)
michaelrsweet commented 5 months ago

@Nachtpfoetchen The "tspl_300dpi" driver is the TSPL2 driver, which I have only tested with a Rollo X1038 - that printer is 203dpi, but the same code is used as for the 300dpi mode.

What happens when you try to print?

Nachtpfoetchen commented 5 months ago

It says it was was successful, but nothing gets printed. screenshot is german, and idk howw to turn the website language to english without changing my whole locale. where can i find the logs. Might be easier to understand :) Screenshot 2024-01-18 at 18-08-23 XP-420b - LPrint

michaelrsweet commented 5 months ago

Hmm, not sure how to debug this - no errors and the printer is just ignoring the print file... How is the printer connected to your system?

Nachtpfoetchen commented 5 months ago

It is connected via usb to a hub, which is connected to the pc.Maybe the hub is the problem. Will try a direct connection for further investigation. Also orderd a different cable to make sure that this is not the culprit. Will take some days to arrive..

proski commented 5 months ago

We might be having the same issue. I'm trying to make Munbyn ITPP941 work. Most jobs are shows as "aborted" in the lprint web interface.

I tried running the lprint server in a terminal with this command:

sudo lprint server -o log-file=- -o log-level=info

I'm seeing error messages like this:

I [2024-01-21T08:00:31.449Z] [Job 15] Starting print job.
I [2024-01-21T08:00:31.452Z] [Job 15] Page 1 raster data is 812x1218x24 (sRGB)
E [2024-01-21T08:00:31.452Z] [Job 15] Unsupported raster data seen.
I [2024-01-21T08:00:31.454Z] [Job 15] Aborted, job-impressions-completed=1.

Looking for Unsupported raster data seen in the sources (it's in pappl), I see that it's only reported when data with over 8 bits per pixel is sent to the printer that doesn't support color. The client is sending data with 24 bit per pixel.

I was able to print PDF files from the Google Drive app on Android. I could also print the test page from the lprint web interface. I cannot print PDF files from Evince or Firefox on the Linux system that runs the lprint server.

michaelrsweet commented 5 months ago

@proski That sounds like a known OpenPrinting (cups-filters) bug that recently got fixed... Nothing LPrint can do about it, sorry...

proski commented 5 months ago

Thank you, @michaelrsweet ! Updating libcupsfilters to the current master branch has made all the difference for me! I can print labels from PDF files opened in Firefox, which is how I use my printer. Unfortunately, I'm hesitant to recommend others what I did (unless they are familiar with software packaging for their distro). Hopefully, another release of libcupsfilters won't take long.

@Nachtpfoetchen: I'm sorry, your issue is probably different, as the last job is shown as completed. I only get that status if something gets printed.

The PPD you posted shows that the default resolution is 203dpi, not 300dpi. You should probably try the tspl_203dpi driver. Were you trying to print the test page? If not, try "Print Test Page" on the lprint web interface. It worked for me even before I upgraded libcupsfilters.

Nachtpfoetchen commented 5 months ago

It is connected via usb to a hub, which is connected to the pc.Maybe the hub is the problem. Will try a direct connection for further investigation. Also orderd a different cable to make sure that this is not the culprit. Will take some days to arrive..

So tired with another cable and direct connection to the PC. I calibrated the printer in a Windows VM with a tool by the manufacturer. It did work flawless and everything looks fine on the test prints that i did via their tool.

in lprint it shows status "finished", where as on cups it says "held back" (i am not sure what the correct english names are since my system is set to german).

Any ideas where i can further investigate what is going on? (Also since i now have set up virtual box i also can test how it behaves on an other distribution if that would make it easier).

Nachtpfoetchen commented 5 months ago

1886-2198-max I could get it to print out config information of my printer with previously mentioned windows only debug tool from a vm.

michaelrsweet commented 5 months ago

@Nachtpfoetchen So "held back" sounds like the job hasn't actually been sent from CUPS.

The test print shows a resolution of 8 dots per millimeter which is 203.2dpi, so you should be using the tspl_203dpi driver. Beyond that I'm not sure what to say since I don't have this particular printer to test with...

michaelrsweet commented 1 month ago

Closing for now; if you have additional information we can re-open the discussion as needed.