• 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
Printing WebView as a subview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Printing WebView as a subview


  • Subject: Printing WebView as a subview
  • From: John Nairn <email@hidden>
  • Date: Fri, 30 Jan 2009 13:04:48 -0800

I found out how to easily print a WebView that follows page margins and paginates correctly just be grabbing the documentView of the mainFrame, which as I recall was to print the NSView found at

     [ [ [myWebView mainFrame] frameView] documentView]

But now I want to print a WebView that is a subview of another view having many other views (NSTextFields, NSTextViews, controls, etc.) where the printing is done through the parent NSView. The web view displays as a scrolling frame in the parent view, but I want the print out to show the entire contents of the web view (without scroll bars) and to paginate through that view along with pagination of the parent view.

My thought was to build an off-screen window and replace the WebView subView with its own documentView resized for the entire contents on the view, but then I was not sure how to paginate that documentView as it might start anywhere on a page?

---------------
John Nairn
GEDitCOM - Genealogy Software for the Macintosh
http://www.geditcom.com


_______________________________________________

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


  • Prev by Date: Re: Re: Why does NSTableView stop responding to validateMenuItem: ?
  • Next by Date: Re: How to draw text with fade out effect?
  • Previous by thread: coreData+bindings+IB challenge.
  • Next by thread: IKSlideshow and Custom Transitions
  • Index(es):
    • Date
    • Thread