Fix for printouts without margins
faure at kde.org
Tue Jan 18 21:18:12 GMT 2005
On Tuesday 18 January 2005 22:00, Kurt Pfeifle wrote:
> If the printer eats characters, the PPD for that printer is probably
> the wrong one (or has a bug).
Fixing the PPD to reflect the reality (3mm minimum margin) doesn't really
fix the issue - 3mm still looks too small by default.
> On Tuesday 18 January 2005 20:36, David Faure wrote:
> > On Tuesday 18 January 2005 21:00, David Faure wrote:
> > > I think kdeprint should ignore that and let qt use default margins in such a case.
> > > Applications which use setFullPage(true), like kword, can still print in the corners
> > > as one would expect; the change seems to only affect code that use setFullPage(false),
> > > like KHTML.
> > 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.
> That's why you still can control the margins by the "Margins" tab in
Sure an advanced user can change the margins - but shouldn't the defaults be
"acceptable"? 3mm is certainly not acceptable, it's far too small for any "normal"
printout (where normal means: a mail or a webpage, not a magazine or an image)
Controlling margins is still possible of course; I'm only talking about choosing
> > 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 setFullPage(false)?
> "full page" in PPD and pre-press specifications always mean "use all
> of the available ImageableArea".
Yes, at most. But that doesn't mean laying out the text so that it actually goes
so close to the edge, by default.
> The user normally defines his/her margins in a KWord/other document,
Not when printing a mail or a webpage. That's a very different operation
from using an office suite, and it should work out of the box, which means giving
reasonable margins by itself.
> In 99% of cases they'll use 1 or more cm.
Exactly. So 0 is really not an acceptable default from KHTML.
So we need default margins from KHTML and other non-full-page-layout
> Why suddenly re-define "full page" to default to fix half-inch where
> it normally means the imageable area of the output device?
On the contrary, I'm redefining the "NOT full page" case! setFullPage(false)
means "please make up some default margins for me" - see the QPrinter documentation and code.
The "full page" - as used by e.g. KOffice - remains unchanged, it's NOT what my patch touches.
> > More aggressive (but more consistent) patch attached.
> Whatever that means....
It's consistent since for any printer, the margins used by e.g. KHTML for the printout
would be the same, whether the printer can print as close as 1mm to the edge or 5mm.
In all cases, >=1cm is needed to "look good". Again, minimum != default.
> If they still allow to go back to "zero" margins in cases where I
> need them, it may be OK for me)
They do, so I'm happy to see you're not objecting after all :)
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel