WebView's documentView returning incorrect PDF using -dataWithPDFInsideRect:
WebView's documentView returning incorrect PDF using -dataWithPDFInsideRect:
- Subject: WebView's documentView returning incorrect PDF using -dataWithPDFInsideRect:
- From: Mel Walker <email@hidden>
- Date: Thu, 16 Feb 2012 13:41:27 -0800
I want to get an image from a WebView's documentView.
When I print it out to a PDF, I get a 2 page result.
When I use -dataWithPDFInsideRect: like so:
NSView* view = [[[webView mainFrame] frameView] documentView];
NSData* pdfData = [view dataWithPDFInsideRect: view.bounds];
I get an 8 page result. The first 2 pages are the same as the "print out" PDF, and the rest are blank.
As far as I can tell, the frame is simply too tall, so the print operation must be adjusting it somehow. I'd like to do the same thing.
--
Mel <email@hidden>
_______________________________________________
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