cups icon indicating copy to clipboard operation
cups copied to clipboard

ippeveprinter - cannot set supported file types when loading attributes from file

Open birktj opened this issue 2 years ago • 1 comments

When setting supported input file types in ippeveprinter with the -f flag the legacy flag is also set.

https://github.com/OpenPrinting/cups/blob/3f7b5cbe7a339ee3f9a7fe64ac2a5dcb08370d8b/tools/ippeveprinter.c#L553-L560

This is incompatible with loading attributes from a file with the -a flag and if both are set ippeveprinter exits with the default usage text. This would have been fine had it not been for the fact that document-format-supported is hardcoded when not set by the -f flag.

https://github.com/OpenPrinting/cups/blob/3f7b5cbe7a339ee3f9a7fe64ac2a5dcb08370d8b/tools/ippeveprinter.c#L1876-L1880

This means that it is not possible to set document-format-supported when using an attribute file.

This also applies to other default attributes that are set in create_printer so I think that the best solution would probably be for each of them to check if they have already been set and if so, don't set them again. Another simpler solution that would help in this specific case would for -f to not set the legacy flag.

birktj avatar Jul 20 '23 23:07 birktj

I'm thinking we should support formats from both -f and -a, where the -f option would override anything in the attribute file.

michaelrsweet avatar Jul 21 '23 12:07 michaelrsweet

[master 8c8a3657c] Support ippeveprinter -f option with -a (Issue #759)

michaelrsweet avatar Apr 05 '24 20:04 michaelrsweet