apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.95k stars 464 forks source link

Printer does not accept user-set options #5581

Closed christianlupus closed 5 years ago

christianlupus commented 5 years ago

I have a Brother QL-500 label printer at home. The device can print a bunch of different formats and will only work if the format installed and the one specified in the driver match up.

OK, let's assume we have some formats A and B (e.g. 23x23mm and 29x90). Let format A be installed physically in the printer. If I set the server default option (via web frontend) and user option (via lpoptions) to A the printer is working as expected. If I change the server defaults in the web frontend (Administration -> Set Default Options) to B, I would assume the user specified option might be overriding the setting back to A. Also some printing applications allow to set the page size. All this is not working, as soon as the server defaults to B the printer refuses to print on A.

The only solution is to have a cups printer installed for all possible paper sizes that might be of interest which blows up the number of printers (exponentially).

To be honest I do not know where this problem lies exactly. Is this a CUPS daemon related problem (my personal guess) or due to the PPD file or the source of the print job (aka the user's programs).

I am running Archlinux (up to date) with the bundled cups package. If you need special information, please tell me.

michaelrsweet commented 5 years ago

@christianlupus What application are you using to print?

What options are you passing in from the application?

Can you provide a debug CUPS error_log? (run "cupsctl --debug-logging", print something, look in the /var/log/cups/error_log file, assuming that's where ArchLinux puts things...)

FWIW, the default set in the PPD (which is what the web interface changes) is overridden by any user-specified size at print time. The expected behavior is that a single queue can support multiple media sizes, depending on the printer's capabilities, and that users can choose which size to use at print time.

christianlupus commented 5 years ago

@christianlupus What application are you using to print?

I tried with glabels. I also tried with okular as far as I remember but just to be sure that the problem is not purely within glabels. I could of course make a PDF of matching size and see if okular can print and override the server settings if this helps.

What options are you passing in from the application?

As it is a GTK/QT GUI I do not know how to obtain this information exactly. I tried to set the information both as user defaults using lpoptions as well as in the options of the print job within the GUI.

Can you provide a debug CUPS error_log? (run "cupsctl --debug-logging", print something, look in the /var/log/cups/error_log file, assuming that's where ArchLinux puts things...)

I will do so but I need to be close to the printer to turn it on. So this might take a few hours until I am at home.

FWIW, the default set in the PPD (which is what the web interface changes) is overridden by any user-specified size at print time. The expected behavior is that a single queue can support multiple media sizes, depending on the printer's capabilities, and that users can choose which size to use at print time.

This was my intention and assumption as well but I had to aks in case it was a feature and not bug ;-).

christianlupus commented 5 years ago

OK, sorry for my late reply. I did the testing and I got an debugging output. As it is quite lengthy, I put it in a gist.

One other thing I am seeing (but I am unsure if this is related at all): The screenshot of glabels' print dialog shows that I cannot change the page size in it. In the other tabs there is no option to set it as well. Normally it is under "Eigenschaften" (German for properties) in other applications.

Screenshot_20190518_124730_glabels

michaelrsweet commented 5 years ago

OK, so there is a bunch of stuff going wrong here.

First, you are doing client-side filtering and sending the raw print data to another CUPS server, which likely won't auto-detect the print format correctly.

Second, I'm seeing some error messages from the Brother driver - not sure what they mean, but I suspect if you just use a local raw queue or use the IPP Everywhere driver instead on the client.

christianlupus commented 5 years ago

So all in all you are telling me that I should be doing this as in my QL-500-server or QL-500-server-raw configuration? I can redo the test, the same macroscopic effect does happen. I will provide you with the corresponding logs soon.

christianlupus commented 5 years ago

OK, sorry for my late reply, I was a bit ill and could not drive to my parent's home where the issue is located.

I updated the gist to reflect the problematic case's logs. In the newly uploaded logs I use the IPP Everywhere printer driver on the client and the Brother driver on the server. Maybe you can tell me more, what the problem is.

Thanks a lot