khtml printing. How to scale or print full size?

Shift shift at free.fr
Tue Nov 11 16:31:03 CET 2003


Le Tuesday 11 November 2003 15:45, Unai Garro a écrit :
> Hi there, 

Hi,

> I use khtml in my app to show recipes, and then the app is meant 
> to print it.
>
> Here's a sample file generated by the app:
> http://www.see.ed.ac.uk/~uga/recipe.html
>
> and pdf file resulting from printing it:
> http://www.see.ed.ac.uk/~uga/recipe.pdf
>
> If you have a look at the pdf, or try to print it from konqui you'll see
> what the problem is. It generates a tiny printout only, instead of a full
> width page.

The tiny size come from the fact that you page has an horizontal scroolbar.
Konqui wants to print all the page so it reduces the size.

You can try to solve the problem by changing your CSS :
#photo
{
	visibility: visible;
	position: absolute;
	top: 0px;
	left: 0px;
	width: 159px;  /* Instead of 1565.55px ;-) */
}

> Only if I remove "width=" tags, it's printed in full size.
>
> Is there any way I can force it to print in full size? I can't avoid
> specifying the widths, since it's meant to show the recipe correctly
> formatted.
>
> Thanks very much
>
> 	Unai
>
> PS: the only thing the code does is using the method:
> KTHMLPart::View()->print()

I haven't test what I say but it will work.

Franck


More information about the kde-print mailing list