Fix for printouts without margins

David Faure faure at
Tue Jan 18 20:00:19 GMT 2005

After my wife hit that bug yet again, I decided it was time to fix it :)

When printing from KHTML (a webpage or a mail), it is quite common to end up with
a printout that has no margins at all - i.e. the text tries to start from the top and left borders
of the physical page, and the printer eats a few characters due to that.

The reason is that the PPD file for the printer says
*ImageableArea A4/A4: "0 0 595 842"
*PaperDimension A4/A4: "595 842"
i.e. no margins at all.
(Of course people who use a PPD which specifies margins don't see this bug - lucky them).

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.

Any objections to me committing the attached patch?

David Faure, faure at, sponsored by Trolltech to work on KDE,
Konqueror (, and KOffice (
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdeprint_margins.diff
Type: text/x-diff
Size: 993 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list