-
Notifications
You must be signed in to change notification settings - Fork 195
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
[WIP] PPD option preset auto-generation for common job IPP attributes #236
base: master
Are you sure you want to change the base?
Commits on Sep 1, 2021
-
PPD option preset auto-generation for common job IPP attributes
To make the job IPP attributes "print-color-mode", "print-quality", and "print-content-optimize" actually doing "the right thing" for most printers we auto-generate PPD option presets now. CUPS already had the functionality to apply a preset of one or more PPD option settings for each of the 6 combinations of "print-color-mode" and "print-quality" settings for longer time but this was never actually being made use of as it required manually defining the presets via "APPrinterPreset" PPD attributes. This no one wants to do with the ~10000 PPDs which come with a typical Linux distribution nowadays. Even a user with his few print queues does not want to do it, know how to do it, or know that it is even possible. This commit makes this fully automatic on every PPD where the presets are not already manually defined via "APPrinterPreset" attributes. When creating the PPD cache for a queue's PPD file and the PPD is without manual presets, it calls the new function _ppdCacheAssignPresets() which analyses for each PPD option the names of the choices to find out which choices switch to manochrome or to color, lower or raise print quality, or improve text/graphics/photo printing and which are the moset suitable of them. It also analyses the PostScript/PJL code of the choices to find out whether it affects the printing resolution. With this it selects which options get into the the presets and with which choices. In addition to presets for the "print-color-mode"/"print-quality" combos presets for "print-content-optimize" are introduced. PPD Option settings added by preset are logged on job execution.
Configuration menu - View commit details
-
Copy full SHA for 3b07df3 - Browse repository at this point
Copy the full SHA 3b07df3View commit details -
Fixed bugs revealed by LGTM.com
This especially revealed that on selecting the final setting for the color mode/quality presets only 2 of the intended 3 passes were done.
Configuration menu - View commit details
-
Copy full SHA for 14f3883 - Browse repository at this point
Copy the full SHA 14f3883View commit details -
Replaced "str(n)casecmp()" by "_cups_str(n)casecmp() for portability
Automatic Windows test build errored on that.
Configuration menu - View commit details
-
Copy full SHA for a925de9 - Browse repository at this point
Copy the full SHA a925de9View commit details -
Introduced own implementation of strcasestr(), for build on Windows
Windows does not have a strcasestr() so we have to provide our own implementation, as we already did with strcasecmp() and strncasecmp().
Configuration menu - View commit details
-
Copy full SHA for d054b11 - Browse repository at this point
Copy the full SHA d054b11View commit details
Commits on Sep 10, 2021
-
PPD option preset auto-generator: Added some more option/choice names…
… to check for Checking the PPD file for the HP LaserJet 4050 (PostScript) found more option/choice names of options which influence print quality: - Smoothing - Halftone - ProRes(600/1200/2400) Some other of HPLIP's PostScript PPDs use "HPPJLColorAsGray" with choices "yes" and "no" instead of ""HPColorAsGray" with "True" and "False". libcupsfilters: More PPD preset rules, especially for HP Also analyse choice names for options which contain "Resolution" in their names.
Configuration menu - View commit details
-
Copy full SHA for c5c278f - Browse repository at this point
Copy the full SHA c5c278fView commit details
Commits on Sep 15, 2021
-
PPD option mapping auto-generator: Consider "ColorMode" also with prefix
This way we also cover "cupsColorMode" for example which appears in auto-generated PPDs for driverless IPP printers (in case we cannot print directly to the printer but only have access via a CUPS queue). Also updated a comment and a log message.
Configuration menu - View commit details
-
Copy full SHA for 36583f2 - Browse repository at this point
Copy the full SHA 36583f2View commit details
Commits on Sep 24, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 2b4e2b9 - Browse repository at this point
Copy the full SHA 2b4e2b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for b75275f - Browse repository at this point
Copy the full SHA b75275fView commit details -
_ppdCacheAssignPresets(): Added NULL checks for option choice propert…
…ies record Static analysis of code, GitHub code scanning, found missing NULL checks for allocating memory for option choice properties records (gives NULL when out of memory) and for grabbing the records from a CUPS array (should now never happen as we now skip the option on the first memory allocation failure). Added appropriate NULL checks. Now in case of unsufficient memory the current option gets skipped on the first failed calloc() call.
Configuration menu - View commit details
-
Copy full SHA for 97e4485 - Browse repository at this point
Copy the full SHA 97e4485View commit details
Commits on Sep 25, 2023
-
Content optimize "presets" -> Content optimize "mappings"
Renamed the fields in _ppd_cache_s and updated the comments.
Configuration menu - View commit details
-
Copy full SHA for adb8deb - Browse repository at this point
Copy the full SHA adb8debView commit details