Re: Print report using WebView
Re: Print report using WebView
- Subject: Re: Print report using WebView
- From: "Sherm Pendley" <email@hidden>
- Date: Wed, 1 Oct 2008 16:37:03 -0400
On Wed, Oct 1, 2008 at 4:15 PM, Vitaly Ovchinnikov <
email@hidden> wrote:
>
> I need to print reports with various styles. The only reasonable way
> for me is to generate HTML and use WebView for rendering and print.
> I create WebView, generate HTML string and pass it to WebView. Then I
> create NSPrintOperation on it. All works fine, but it prints one empty
> page at the end. It seems that I missed something...
Have you tried using CSS to assign a 0" bottom margin to the <body> element
of your HTML? In the past, I've seen web browsers do some really stupid
things, like use an additional page to print empty space. I've even seen
them *split* a line of text across pages, with the tops of the letters on
one page, and the bottoms on the next.
What happens if you save your HTML to a file, then print it using Safari?
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden