printing still has problems in Letter at least

George Staikos staikos at kde.org
Wed May 8 20:30:03 BST 2002


On April 18, 2002 03:35, Michael Goffioul wrote:

> >    In head (at least) there still appears to be problemss.  I just
> > printed out a web page and the postscript file is in Letter format, but
> > text runs off the bottom/in from the top.  It appears that things at the
> > bottom of the previous page are also on the top of the subsequent page. 
> > I don't know if this is KHTML or not, but something is not right.
> >
> >    Is this Letter vs A4 related?
>
> No, it's khtml not using print margins. The fact that text is repeated
> is the normal khtml behaviour (very simple algorithm to avoid losing
> text between 2 pages). The real problem is that khtml uses margins
> defined in CSS, using a "media" directive. By default it uses 2cm.
> However many web sites override the CSS margins and set them to 0.
> Khtml then print with zero margins.
> In the khtml default CSS, there's 2 "media" directives: one for the
> screen with very small margins, and one for "print" with 2cm margins.
> In many web sites, the margins are overridden using a single "media"
> directive without any further specification. The associated attributes
> are then applied to all media, including "print" media, which is IMO
> not what the web designer wants. However, opinions are divergent.
> Where's the fault? In web designers who should write correct CSS? In
> khtml who should handle this more gracefully? And if you want real
> WYSIWYG print result, should print margins be used if there's none
> on the screen (it sounds stupid, but I heard that).
> This is a known problem (it was known before 3.0 release). I already
> discussed this Dirk in Nurnberg, but no solution pops up. It seems
> this khtml behavior was changed by kmail developers. I already
> mentionned this several times on devel lists. I don't feel confident
> enough with khtml code and CSS to fix this myself, and until now
> nobody has feel enough the need to fix it.

   This came up on Slashdot today too.  This is a very important fix.  I would 
like to see it in 3.0.1, and I personally feel it's worth holding up 3.0.1 
for.  What we really need is for KHTML to just print in a sane way... not run 
over borders, not repeat text.  If this means that we have to hardcode 
margins for now, then that sounds acceptable to me.  The current 
implementation is entirely useless for printing out large blocks of text 
though.









More information about the kfm-devel mailing list