Printing WebView as a subview
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