Skip to content
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

InputSlot heuristic for photo sizes doesn't always work #569

Closed
yetamrra opened this issue Dec 2, 2022 · 2 comments
Closed

InputSlot heuristic for photo sizes doesn't always work #569

yetamrra opened this issue Dec 2, 2022 · 2 comments
Labels
bug Something isn't working priority-medium
Milestone

Comments

@yetamrra
Copy link
Contributor

yetamrra commented Dec 2, 2022

In _ppdCacheGetInputSlot(), there's a check that tries to look up the value for "photo" if media-source wasn't supplied in the request. This seems to work fine for a lot of printers, but breaks in this scenario:

  1. Japanese printer has an L-sized photo tray.
  2. User loads Hagaki paper in the main tray and tries to print without specifying a tray.
  3. cupsd sees that Hagaki is smaller than 5x7" and automatically requests the photo tray.
  4. Printer fails the job because Hagaki can't be loaded from the L-sized photo tray.

Should this check change to look up "auto" instead? Based on our PPD database, removing it entirely would break a few models, but "auto" should work in nearly every case. With a small refactor, it could also keep the "photo" case as a fallback for PPDs that have a photo InputSlot option but not an auto option.

@michaelrsweet
Copy link
Member

I like the idea of defaulting to "auto" when no media-source is supplied and only mapping when there is no auto source.

@michaelrsweet michaelrsweet added bug Something isn't working priority-medium labels Dec 2, 2022
@michaelrsweet michaelrsweet added this to the v2.4.x milestone Dec 2, 2022
@yetamrra
Copy link
Contributor Author

yetamrra commented Dec 2, 2022

OK, I'll put together a PR later today.

michaelrsweet added a commit that referenced this issue Dec 5, 2022
Update InputSlot selection for photo sizes (fixes #569)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-medium
Projects
None yet
Development

No branches or pull requests

2 participants