• 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: oddball WebKit printing issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: oddball WebKit printing issues


  • Subject: Re: oddball WebKit printing issues
  • From: glenn andreas <email@hidden>
  • Date: Thu, 18 Jan 2007 15:31:14 -0600


On Jan 18, 2007, at 3:14 PM, Jim Thomason wrote:


(2) Even weirder, the NSPrintOperation doesn't work unless I try to call print on the WebView itself in advance. here's the code:


[snip]
[[printView mainFrame] loadHTMLString:printString baseURL:nil];


Don't forget that WebViews don't synchronously load their pages - this is done asynchronously (since you don't want potentially hang your app just because the network is slow), and until it calls its loading delegate to say that the main frame has loaded, there's basically nothing in the page (and thus the problem you're seeing).

You'll want to implement your view as a delegate of the web view and queue up the printing operation in the "main frame has finished loading" callback.


Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build, mutate, evolve, animate




_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >oddball WebKit printing issues (From: "Jim Thomason" <email@hidden>)

  • Prev by Date: Re: zip files
  • Next by Date: Re: is printing tabular data really that annoying?
  • Previous by thread: oddball WebKit printing issues
  • Next by thread: SFAuthorization KAuthorizationEnvironmentIcon setting not working
  • Index(es):
    • Date
    • Thread