Intented meaning of GtkPageSetup margins


I would have posted this in the application list except that the answer
will likely be used to modify GTK itself. The reference for this
question is

We are concerned with calculating the printable area of a GtkPrintContext.

For the CUPS backend there are two sources of information in the PPD
file. The first one is the line HWMargins which is currently accessed
through the gtk_print_context_get_hard_margins function. And the second
one is the line ImageableArea which becomes the margins of the
GtkPageSetup structure associated with the GtkPrintContext.

In fact, we believe that the right thing to do is to modify the logic
behind gtk_print_context_get_hard_margins to take into account the
GtkPageSetup margins. For CUPS, the area derived from ImageableArea
(which I believe is a subset of the area derived from HWMargins)
represents the printable area of the paper. Hence the GtkPageSetup
margins delimit the printable area from the unprintable area. Tests show
that disrespecting these margins results in clipping.

The question is: do these semantics carry over to other backends (such
as PDF)? Are the margins of the GtkPageSetup meant to delimit the
printable from the unprintable area of a page, regardless of the backend?

Thanks and best regards,

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]