-
Couldn't load subscription status.
- Fork 255
ppd-mark: try to map PageSize to PPD if media is missing. Fixes #1375 #1377
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
base: 2.4.x
Are you sure you want to change the base?
Conversation
…rinting#1375 When CUPS prints to another CUPS over IPP, it uses PageSize instead of media or media-col, as it is assumed that PPD files (or at least the attribute values) are synced on both sides. However this is not the case with ippeve or drvless auto-generated PPDs, where only Adobe names are used for page sizes instead of the values on the remote side, which makes page selection inconsistent. Try to map Adobe names to PPD names on the server side, if only PageSize is provided in IPP request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, "media" trumps InputSlot, MediaType, PageRegion, and PageSize. If "media" is not set then this mapping should be happening later in the cupsMarkOptions function, which calls ppd_mark_option.
What probably needs to happen here is for this PageSize logic to be moved to ppd_mark_option, otherwise we aren't covering all places that might mark a PPD size using a PWG name. Also, if ppd->cache is NULL, don't try the mapping...
I'm not sure if I follow. Right now as far as I understand marking PageSize in Or wait, does the order of PageSize/Media/InputSlot/... matters, and they are not reordered on the server side before being processed? And if Media goes after PageSize, it will redefine?
Null check is present in |
Right now "PageSize" only handles PPD sizes while "media" handles both PPD and PWG size names. Your change overrides (without replacing the value of) PageSize when it isn't a PPD name in cupsMarkOptions, but there are other places where
The order of processing matters, but there are multiple places where
Fair enough, I wasn't sure and we don't usually have those sorts of checks in the private APIs. |
When CUPS prints to another CUPS over IPP, it uses PageSize instead of media or media-col, as it is assumed that PPD files (or at least the attribute values) are synced on both sides.
However this is not the case with ippeve or drvless auto-generated PPDs, where only Adobe names are used for page sizes instead of the values on the remote side, which makes page selection inconsistent.
Try to map Adobe names to PPD names on the server side, if only PageSize is provided in IPP request.