OpenPrinting / cups

OpenPrinting CUPS Sources
https://openprinting.github.io/cups
Apache License 2.0
967 stars 177 forks source link

Printing from Windows skips printer settings in CUPS #869

Closed TNTalib closed 3 months ago

TNTalib commented 5 months ago

Describe the bug I set my EPSON L805 printer in CUPS to print photo paper in high quality. When I print from Linux it is OK, when I print from Windows (clean install, no other drivers except the standard Windows IPP) the settings in CUPS are bypassed and the printer prints with the standard low quality settings. Printing a test page directly from CUPS uses the preset settings.

To Reproduce Steps to reproduce the behavior: Just print something from Windows

Expected behavior Printing with printer settings preserved in CUPS

System Information:

zdohnal commented 5 months ago

Hi,

please enable CUPS debug logging on the server (via cupsctl LogLevel=debug2), reproduce the issue (from both clients - Ubuntu and Windows) and attach debug logs here as a file.

Thank you in advance!

TNTalib commented 5 months ago

error_log.txt Hi! Error log in attachments. Clean log, turning on the printer, print from windows, print from linux. Changed IPs to WINCLIENT-ADDRESS, LINUXCLIENT-ADDRESS, SERVADDRESS, and username to CUPSUSER. Printed onepage-a4.pdf this on both clients. Job size from windows client is 359k - from linux it's only 50k

Thank you for help :)

zdohnal commented 5 months ago

I see that Windows client sends print-quality attribute as part of create-job request, which we take as option which overrides all. Linux client does not send the attribute as part of the request, so we take data from PPD file.

Windows client job:

d [22/Jan/2024:10:38:42 +0100] [Job 31] Mapping print-quality=4 to cupsPrintQuality=Normal
...
D [22/Jan/2024:10:38:42 +0100] [Job 31] argv[5]="... print-quality=4 ... printer-resolution=300x300dpi ... cupsPrintQuality=Normal ..."

where Linux client job:

D [22/Jan/2024:10:41:49 +0100] [Job 32] argv[5]="...print-quality=0 printer-resolution=300x300dpi Resolution=300dpi ..."

since Linux job is working, I would say your driver does quality based on Resolution option - can you upload your PPD file as well?

@michaelrsweet it seems we have to generate PPD-based printer option as well, in case classic driver is in use... and is print-quality=0 correct option value?

TNTalib commented 5 months ago

Sure! ZIP file with PPDs in attached files. (Files created with EPSON ESC/P-R drivers) PPD.ZIP

TNTalib commented 3 months ago

Hello @zdohnal, is there any progress on this issue? Thank you!

zdohnal commented 3 months ago

@TNTalib sorry, stuck in other things.

I've looked into it briefly again - I guess you meant media type (type of paper you have in printer - filters change output accordingly) instead of print quality:

Win client sends this:

D [22/Jan/2024:10:38:42 +0100] [Client 12] 2.0 Create-Job 3
d [22/Jan/2024:10:38:42 +0100] cupsdProcessIPPRequest(0x5558cab96740[12]): operation_id=0005(Create-Job)
d [22/Jan/2024:10:38:42 +0100] cupsdProcessIPPRequest: operation-attributes-tag
d [22/Jan/2024:10:38:42 +0100] cupsdProcessIPPRequest: attributes-charset charset 'utf-8'
d [22/Jan/2024:10:38:42 +0100] cupsdProcessIPPRequest: attributes-natural-language naturalLanguage 'en'
d [22/Jan/2024:10:38:42 +0100] cupsdProcessIPPRequest: printer-uri uri 'ipps://SERVADDRESS:631/printers/epson-foto_a4'
d [22/Jan/2024:10:38:42 +0100] cupsdProcessIPPRequest: job-name nameWithoutLanguage 'onepage-a4.pdf'
d [22/Jan/2024:10:38:42 +0100] cupsdProcessIPPRequest: requesting-user-name nameWithoutLanguage 'JAN-PC\\\\Jan'
d [22/Jan/2024:10:38:42 +0100] cupsdProcessIPPRequest: job-attributes-tag
d [22/Jan/2024:10:38:42 +0100] cupsdProcessIPPRequest: copies integer '1'
d [22/Jan/2024:10:38:42 +0100] cupsdProcessIPPRequest: media-col collection '{media-size={x-dimension=21000 y-dimension=29700} media-type=stationery}'
d [22/Jan/2024:10:38:42 +0100] cupsdProcessIPPRequest: output-bin keyword 'face-up'
d [22/Jan/2024:10:38:42 +0100] cupsdProcessIPPRequest: print-color-mode keyword 'color'
d [22/Jan/2024:10:38:42 +0100] cupsdProcessIPPRequest: print-quality enum 'normal'
d [22/Jan/2024:10:38:42 +0100] cupsdProcessIPPRequest: multiple-document-handling keyword 'separate-documents-collated-copies'
d [22/Jan/2024:10:38:42 +0100] cupsdProcessIPPRequest: sides keyword 'one-sided'
d [22/Jan/2024:10:38:42 +0100] cupsdProcessIPPRequest: printer-resolution resolution '300dpi'

and linux this:

D [22/Jan/2024:10:41:48 +0100] [Client 105] 2.0 Create-Job 3
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest(0x5558caba7480[105]): operation_id=0005(Create-Job)
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: operation-attributes-tag
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: attributes-charset charset 'utf-8'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: attributes-natural-language naturalLanguage 'en-us'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: printer-uri uri 'ipps://SERVADDRESS:631/printers/EPSON-foto_A4'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: requesting-user-name nameWithoutLanguage 'jan'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: job-name nameWithoutLanguage 'onepage-a4.pdf'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: job-attributes-tag
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: Collate boolean 'true'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: ColorModel nameWithoutLanguage 'RGB'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: Duplex nameWithoutLanguage 'None'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: finishings enum 'none'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: job-cancel-after integer '10800'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: job-originating-host-name nameWithoutLanguage 'localhost'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: job-originating-user-name nameWithoutLanguage 'jan'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: job-priority integer '50'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: job-sheets 1setOf nameWithoutLanguage 'none,none'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: job-uuid uri 'urn:uuid:907caed4-7d45-343c-4864-cd727ce7d9d0'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: media keyword 'om_a-4-borderless_210x297mm'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: number-up integer '1'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: orientation-requested enum '0'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: output-bin keyword 'face-up'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: output-format nameWithoutLanguage 'pdf'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: OutputBin nameWithoutLanguage 'FaceUp'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: PageSize nameWithoutLanguage 'A4'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: print-color-mode keyword 'color'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: print-quality enum '0'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: printer-resolution resolution '300dpi'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: Resolution nameWithoutLanguage '300dpi'
d [22/Jan/2024:10:41:48 +0100] cupsdProcessIPPRequest: sides keyword 'one-sided'

see the "media-type=stationery" in win client request (part of media-col attribute)? IMO it is the reason why you get the different output - Win client sends the option, so its value is used instead of server default. Linux client does not send the option at all.

So that's the problem AFAIK - IMO we can't do much about this :( .