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

ppd-generator.c: Check for urf-supported if we found image/urf #39

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

zdohnal
Copy link
Member

@zdohnal zdohnal commented Feb 13, 2024

Some devices has AirPrint disabled by default/admins has disabled it, but the device reports image/urf in document-format-supported, but provides no urf-supported attribute, which breaks PPD generation.

We should check for urf-supported once we found image/urf, so in case the device is missing urf-supported and provides other driverless standard, the other standard is used for PPD generation.

Fixes Fedora issue

Some devices has AirPrint disabled by default/admins has disabled it,
but the device reports `image/urf` in `document-format-supported`, but
provides no `urf-supported` attribute, which breaks PPD generation.

We should check for `urf-supported` once we found `image/urf`, so in
case the device is missing `urf-supported` and provides other driverless
standard, the other standard is used for PPD generation.

Fixes [Fedora issue](https://bugzilla.redhat.com/show_bug.cgi?id=2263053)
@tillkamppeter tillkamppeter merged commit 42ce356 into OpenPrinting:master Feb 13, 2024
@tillkamppeter
Copy link
Member

Thanks for the PR, I have merged it now.

In reality, all the 3 Raster output formats, not only Apple Raster, but also PWG Raster and PCLm have additional printer IPP attributes (pwg-... and pclm-...) describing which resolutions, color modes, ... are accepted when using the format. So to make it perfect one should also check for PWG Raster and PCLm whether these additional attributes are actually there and so raster data working on the printer can be generated.

@zdohnal
Copy link
Member Author

zdohnal commented Feb 13, 2024

@tillkamppeter sounds great!

I see pclm-source-resolution-supported as required for PCLm, and pwg-raster-document-resolution-supported for PWG Raster in the generator (the IPP Everywhere standard marks several other attrs as required, but I guess our generators want to be permissive...) - sounds good to add checks for them?

@tillkamppeter
Copy link
Member

Yes, I would do so, so that the formats PWG Raster and/or PCLm are only accepted if there is sufficient info to generate them correctly.

For me it looks like that document-format-supported does not change with the settings done in the web admin interface of the printer, but the urf-supported, pwg-..., and pclm-... attributes are included or not included depending on which format are turned on and which are turned off by the web interface. It would be correct if document-format-supported also varies accordingly with the settings. But as this is not the case we have to check for the required attribute being present in order to accept a certain input format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants