Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: (no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (no subject)



On Tuesday, July 22, 2003, at 12:31 AM, Jeff Sauer wrote:

I'm running into difficulties printing a webView in my NSDocument based
application.  I want to send the ENTIRE webView content to the printer,
not just the portion that is visible on screen in my window...

Here is the code I'm using:

- (void)printShowingPrintPanel:(BOOL)showPanels {
     // Obtain a custom view that will be printed
     NSView *printView = webView;

     // Construct the print operation and setup Print panel
     NSPrintOperation *op = [NSPrintOperation
                 printOperationWithView:printView
                 printInfo:[self printInfo]];


Do I need to do anything extra special with the webView?  Has anyone
had any luck with this?

For printView, you want to pass the documentView of a WebFrameView. For example, if you want to print the main frame, pass [[[webView mainFrame] frameView] documentView]. Otherwise you will be printing the clipped contents of the webView, as you discovered.


John
_______________________________________________
webkitsdk-dev mailing list | email@hidden
Help/Unsubscribe: http://www.lists.apple.com/mailman/listinfo/webkitsdk-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >(no subject) (From: Jeff Sauer <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.