Description of problem: When a printer is added, the code that sets the page size is not quite right. It adds a printer option default for "PageSize". This has no effect on the PPD for the queue, so applications may get conflicting information about what the right default size is for the printer. The correct way to do it is to set the "media" setting to either iso_a4 or na_letter, using the method described in bug #749235. However, that isn't possible due to a limitation of cups-pk-helper. The next best thing is to do it the way system-config-printer currently does it: 1. after adding the printer, fetch the PPD 2. mark the correct PageSize default, if it can be found ("A4" or "Letter") 3. perform a CUPS-Add-Printer request, providing the new PPD file Version-Release number of selected component (if applicable): gnome-settings-daemon-3.2.1-1.fc16.x86_64
I don't think we should be adding workarounds like that. If we need a new method in cups-pk-helper, lets just add one there.
OK, marking this as blocked by bug #749235.
I agree with Matthias, I'll suggest the new method to upstream.
Hi Tim, I've implemented the method you talk about in #749235 but when I want to set 'media' to 'iso_a4' it doesn't work. I have to set 'media-default' to see the change in 'lpoptions' (shown in 'media' btw). It also works with the method PrinterAddOptionDefault() when setting 'media'. Also, shouldn't we set 'iso-a4' here for A4 instead of 'iso_a4'? Regards Marek
The correct attribute name is "media", not "media-default". Setting media-default will add a server-side option in printers.conf, but will *not* adjust the PPD. You're right about iso-a4 though, sorry about that. # lpadmin -p Charlie -o media=na-letter # systemctl restart cups.service # be sure that changes are written to the files # grep media /etc/cups/printers.conf # grep \*DefaultPageSize /etc/cups/ppd/Charlie.ppd *DefaultPageSize: Letter # lpoptions -p Charlie -l | grep PageSize | grep -o '\*[^ ]*' *Letter # lpadmin -p Charlie -o media=iso-a4 # systemctl restart cups.service # be sure that changes are written to the files # grep media /etc/cups/printers.conf # grep \*DefaultPageSize /etc/cups/ppd/Charlie.ppd *DefaultPageSize: A4 # lpoptions -p Charlie -l | grep PageSize | grep -o '\*[^ ]*' *A4
This has been fixed in gnome-settings-daemon-3.4.1-1.fc17. I don't plan to backport the change into Fedora 16. Regards Marek