[cups.development] [RFE] STR #3818: Add ppdNextGroup() and ppdNextGroupedOption() routines to PPD API

John A. Murdie john at cs.york.ac.uk
Thu Mar 24 07:39:18 PDT 2011


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

The PPD API routine ppdNextOption(ppd_file_t *) unfortunately returns the
PPD options from all groups sorted by the identifier option->keyword,
which isn't the most user-friendly text sort order for an application
user. For a routine meant to be used to provide the print option choices
for an application, a better choice for the sort would be first by group
'text' (not name, which is an identifier) and then by option 'text'.

I'd agree, of course, that a desktop environment's standard print dialogue
(used by all conformant applications) should define its own rules for the
most human-presentable user interface. The next best thing, however, is
for the underlying print API to provide default functionality for best
'lowest common denominator' practice. Loathe as I would be to add further
routines to the API, given that it could be upsetting to take away or
alter an existing routine, might new routines ppd_group_t
*ppdNextGroup(ppd_file_t *) and ppd_option_t
*ppdNextGroupedOption(ppd_file_t *) be added? The first would return NULL
when the current iteration of groups was finished, and otherwise the next
group. The second would return the next option from the current group,
sorted by option text.

It is the lack of such routines, I think, that may be responsible for a
lowest-common-denominator application such as Adobe Acrobat Reader
(version 9), which is not targeted at a particular desktop environment,
but which is applicable to any X Window System -using interface, walking
the PPD option group and options by itself. (Despite this, it does not
present the options clearly, in sensible order!) Reader displays the
option texts (rather than the option keywords) from all groups in PPD
order in the print dialogue, with the group names removed - in a
scrollable selector at left of the dialogue panel, showing available and
selected choices of the selected option at the right.

I'd hope that current maintainers of Acrobat Reader and similar
applications would be persuaded to use such new routines - the 'Overview'
text of http://www.cups.org/documentation.php/api-ppd.html needs to
emphasise best practice for programmers of application print dialogues.

Link: http://www.cups.org/str.php?L3818
Version:  -feature





More information about the cups-devel mailing list