• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Print report using WebView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Print report using WebView
      • From: "Vitaly Ovchinnikov" <email@hidden>
References: 
 >Print report using WebView (From: "Vitaly Ovchinnikov" <email@hidden>)

  • Prev by Date: Re: NSString's "mutableCopy" creating a leak?
  • Next by Date: Re: Remove Duplicates in a NSArray
  • Previous by thread: Print report using WebView
  • Next by thread: Re: Print report using WebView
  • Index(es):
    • Date
    • Thread