[Desktop_printing] PageSize vs PageRegion?

Johannes Meixner jsmeix at suse.de
Wed Mar 8 04:56:42 PST 2006


Hello,

On Mar 7 14:43 Alexander Larsson wrote (shortened):
> I'm working on the Gtk+ print dialog, and I have a question about
> PageSize and PageRegion. I'm not sure when and how to use these. Reading
> the PPD spec it seems like you're supposed to use PageSize if the user
> wants a specific page size, and doesn't care from where it comes, and
> PageRegion if the user specifies a specific InputSlot (and
> RequiresPageRegion for that slot is true).

Yes - as far as I understand the PPD spec.

 
> However, I'm representing InputSlot as a dropdown selection in the UI,

You should do it only if InputSlot in an OpenUI...CloseUI environment.

> which means that InputSlot is always set (typically to its default
> value). In most use cases I think the user just wants to pick a page
> size though. In these cases we should ignore the InputSlot and use
> PageSize.

As far as I understand the PPD spec. the GUI can rely on correct
defaults and/or constraints in the PPD.

In particular (according to the PPD spec.) the DefaultInputSlot
can be an existing input slot option or "Unknown".
Furthermore the "minimal *InputSlot entry" example in the PPD spec.
indicates that the DefaultInputSlot can use an input slot option
with empty PostScript invocation value.

If a PPD uses a problematic DefaultInputSlot wich points to
an input slot option which has a PostScript invocation value,
this may lead to a conflict with a different PostScript invocation value
of a non-matching PageSize choice if there are no appropriate
constraints in the PPD.


> The obvious way to handle this would be to have an "automatic" choice
> for InputSlot and use PageSize when that is set.

There is no need to do it if DefaultInputSlot is "Unknown"
or whatever input slot option which has no PostScript
invocation value.
Otherwise it might be a user-friendly feature to automatically
preselect an InputSlot which matches to the selected PageSize.
On the other hand the user must still be able to choose
another InputSlot (assume there are more than one InputSlot
which matches to a PageSize or the user wants the "manual"
InputSlot) so that this automatism becomes complicated.


> I've been looking at
> various existing ppds it looks like some have "Auto" or "AutoSelect"
> choices. Is this something i can rely on?

You cannot rely on this but you can rely on that the defaults
and the constraints in a PPD make sense.
I think you should not try to correct problems in a bad designed
PPD with automatisms in the GUI.



Kind Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH, Maxfeldstrasse 5      Mail: jsmeix at suse.de
90409 Nuernberg, Germany                    WWW: http://www.suse.de/



More information about the Printing-summit mailing list