khtml printing (Was: Fix for printouts without margins)

Kurt Pfeifle k1pfeifle at
Tue Jan 18 22:15:57 GMT 2005

On Tuesday 18 January 2005 21:46, Waldo Bastian wrote:
> On Tuesday 18 January 2005 21:54, Kurt Pfeifle wrote:
> > Cheers,
> > Kurt  [ who thinks it is by far more sucking that he cant control font
> >         sizes from khtml printing. After all, khtml can re-render font
> >         sizes for on-screen layout on the fly -- why not for on-paper
> >         layout. The way khtml determines font sizes is a mystery to me.
> >         It seems to take into account images on the page too, and scales
> >         them plus the text the same amount. Result is more often than
> >         not way to small fonts. Gimme a "Zoom Printed Font" control,
> >         please! ]
> khtml tries to render the page so that it fits the width of the paper, if the 
> minimum width of the page is larger than the paper width, it will render the 
> page using this larger width and then scale the result down to the paper 
> width.

I'll try to run a few more tests in the next days....

But I recall to have seen cases (a few weeks ago) where the same page 
printed differently in each consecutive run (where not a single setting 
was changed in the meanwhile). And these were pages which had no table, 
or frame on them -- resizing the konqui window did let the text re-flow 
nicely, with accordingly different linebreaks....

Try this page f.e. (use print preview to save the paper, or if you dont 
have a printer):

(no fixed width on the page, text reflows depending on your Konqui
window resizing).

Would you agree that this is by far too small a font? Why does it scale 
down so much?

My Konqui settings: minimum font size is 12, medium font size is 14.
Printout on paper looks like being 6-7 pt (CVS HEAD of today). [ Could 
it be that my "screen vs. printer resolution" comes into play here? I.e.
the larger pixels on screen, still visible to my eye, translate to the
same number, but smaller-sized pixels in the printed fonts? ]

Another mystery: I can often (say, in 50% of cases) make it resize the 
printout fonts (to a bigger one) by resizing the Konqui main window to 
a more narrow view before print. In successful cases the printout will 
then have line-breaks the same as on screen. In other cases it doesnt 
change a bit. 3 re-tries later it works again.... 

If at least this would work reliably: Linebreaks and fontsizes set on
paper (at least approximately) "as seen on screen" I could adjust the 
window width before printing, and it would be an acceptable workaround. 
As it is, my impression is that Konqui printing behaves erratic, and 
results cant be predicted.

> Cheers,
> Waldo


More information about the kde-core-devel mailing list