Fix for printouts without margins
goffioul at imec.be
Wed Jan 19 09:34:04 GMT 2005
> In fact 0 is no special case here. If the PPD for my laser
> printer was correct
> it would say that the *minimum* physical margins accepted by
> the printer are
> 3mm. But using 3mm as default margins looks crappy.
> As Kurt Pfeifle made me realize, the margins from the PPD are
> only meant to be
> used to warn when setting too small margins (in applications
> like koffice),
> i.e. "this is outside the printable area" (like MSWindows
> does; we don't have this
> kind of check in KOffice yet). They are really the
> strict-minimum margins, which
> doesn't mean they make reasonable defaults. Can we keep Qt's defaults
> (half-inch/third-inch if I read correctly) when using
> More aggressive (but more consistent) patch attached.
I understand the issue, but I see at least 2 problems with this
patch (not tested, just executed with my brain as C interpreter):
1) you remove from the application any way to access physical margin
values, even when setFullPage(true); the app must then entirely
rely on some guessed/standard default values. Is this wanted?
2) the GUI of the margin property page does not reflect the change
of default values
I thought about adapting the default margin values with the fullpage
flag (false -> use Qt's default, true -> use physical values), but
this would require additional work in the margin property page as the
settings there are system-widely saved (or not) if they differ from
default values, while the actual default values might change from one app
to the other.
The best is probably to use as default the max between the physical margin
and some reasonable standard margin. But this has to be done (at least)
in kprinter.cpp and in kpmarginpage.cpp.
More information about the kde-core-devel