-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong media limits for A4 paper using HP OfficeJet 7740 Pro due ignoring duplicated sizes in ppdCacheCreateWithPPD() #29
Comments
Hi, please follow https://github.com/OpenPrinting/cups/blob/master/REPORTING_ISSUES.md and provide the necessary information - like CUPS debug2 logs when you print and try to reproduce via CUPS CLI. Especially it would be interesting to see how the printer behaves with everywhere driver without hplip PPD. You can install it (if you have IPP enabled on your printer - the Ubuntu reporter has it, but Idk about you - please enable it if you don't):
If the ppd file exists, IPP Everywhere installation went ok and you can try print A4 via it. EDIT: |
error_log.txt PPD: HP_OfficeJet_Pro_7740_series_F712A4.zip I tried to run |
I'm sorry, I didn't realize markdown removed some parts of the command... and from the other files I see you either don't have mDNS working on your machine, or you have disabled IPP on the printer (because I don't see a temporary queue for your printer in lpstat -e - Ubuntu reporter had implicitclass printer there, which indicates the printer works via IPP), thus the command lpadmin might not work if you disabled IPP - you can check if everything is ok for IPP Everywhere by:
if it fails with the error "Host is down", check IPP support in your printer, enable it and try again. If the result is [FAIL], your printer does not support properly IPP Everywhere and you can ignore the lpadmin command. The command should like like this, if your printer's IP is 192.168.178.21 and you choose to name your destination 'test'
and then try to reproduce the issue with this printer. ================================================================================== From the error_log I see you printed a test page and there are no settings regarding page size:
AFAIK if there are no settings from application, printer's default (may de server default or driver default) should be applied by scheduler or filter. Can you attach .txt file with outputs from
What application did you use for printing the test page? Can you try to print a normal A4 page, once without settings and then with settings? f.e.:
and
Do those two work? Printing test page uses a different filter functions, which can influence the output. In any case, thank you for information! |
Thanks for the reply. Here is some more: Creating the test printer worked fine and printing a test page has the proper page dimensions. Everything looks fine.
|
I've looked deeper into the error_log to find any possible page size related logging and I found an interesting log:
The interesting part is |
As a quick note: I made myself an Ubuntu LTS stick and printing from that works just fine. So maybe this bug got introduced later. |
Ok, I found out the reason why it behaves this way - the HPLIP PPD has two size options with the same length and width:
and @piratenpanda can you try to remove/comment out with
and see if it helps? @michaelrsweet @tillkamppeter it looks like HPLIP thought |
With the changed ppd it works just fine |
Moving to libppd - since the code which is in use and causes the issue lives there, but the possible fix will have to happen in CUPS as well. |
Yeah I'm not sure what they are trying to do but it isn't right, even for regular PPDs. Both use the same commands and the cupsInteger0 value (26) is the PCL media size value for A4... Probably the right fix is to exclude any sizes that use a non-standard name for a standard size. |
Previously, if there were two sizes with the same size, but different names in PPD, the second was ignored during generating sizes for PPD cache. This behavior breaks already broken PPDs, which provide two or more different size names for the same width and length (which is incorrect), and if the ignored size was the PPD default (such as A4), user couldn't print a test page. After this fix, we use PPD size name from CUPS if the size is standarized. Fixes OpenPrinting#29
Thinking about it deeper - what if the HPLIP (or any other) filter does depend on using non-standard size name? In such cases we might need to keep all the sizes, even the duplicate ones... WDYT? @tillkamppeter @michaelrsweet |
In case my idea is not useful, I've created PR for Mike's suggestion - use always standard name if the size is standardized. |
Letting We can also have:
By replacing all entries of each page size by one entry with standard name and changing the default page sizes name to the standard nameof the size referenced by it should solve all the above problems. Only if the driver needs the non-standard names one needs to somehow preserve them, for example by keeping the duplicate sizes ... |
@szlt5 found out libppd does not use the same delta as CUPS, which causes filters to use first size from the array, because the similar size according PWG (which recommends max delta 0.5mm) is not matched as useable. Related to OpenPrinting#29, but not fixing the original issue.
…ting#29) @szlt5 found out libppd does not use the same delta as CUPS, which causes filters to use first size from the array, because the similar size according PWG (which recommends max delta 0.5mm) is not matched as useable. Fixes OpenPrinting#29
Thank you for this. After years of working just fine, I suddenly ran into the issue on Ubuntu, and the comment out suggestion in the PPD fixed it |
Describe the bug
When printing A4 pages with the printer a wrong media size is used. See https://bugs.launchpad.net/ubuntu/+source/cups/+bug/2040270 for more details. I have the same issue on arch
To Reproduce
Steps to reproduce the behavior:
Print A4 pages with the HP OfficeJet 7740 Pro.
Media has wrong offset as the printer thinks the paper has media limits of: 0.42 x 0.42 to 27.52 x 35.14 cm
Expected behavior
Print normal A4 pages
System Information:
The text was updated successfully, but these errors were encountered: