WebKit, Printing and Scale
WebKit, Printing and Scale
- Subject: WebKit, Printing and Scale
- From: Andreas Mayer <email@hidden>
- Date: Tue, 7 Feb 2006 18:14:30 +0100
I am trying to use WebKit for printing.
My problem is, that in my case WebKit does not seem to print in the
right scale; everything is a lot bigger than it is supposed to be -
i.e. than it is defined in the style sheet. The factor seems to be
about 1.35, in case that information helps.
It might be worth noting that I'm not printing the WebView directly.
Instead I am adding it as a subview to the view I'm actually
printing. (The reason being that I effectively want to print several
different documents in one print job.)
To make it more clear what the problem looks like:
I want to print on A4 paper, which is about 595 by 842 points in size.
The WebView should fill the page, so I make it that same size (and
thereby fill the parent view).
Next I use a style sheet to set the HTML body to be 595 by 842 points
in size, too.
Now what happens is, that the WebView actually renders scroll bars
around the right and bottom edge of the page while the visible area
is rendered at the above mentioned scale. Here is a PDF of a sample
page:
http://www.harmless.de/download/webview-test.pdf
The red box in the upper left corner should be 1x1 inch (72pt) in size.
Oh, and Safari is able to print that page just fine ...
Any ideas what the problem might be?
Andreas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden