• 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
WebView's documentView returning incorrect PDF using -dataWithPDFInsideRect:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: standard user or admin user ?
  • Next by Date: Re: copy & isEqual nightmares
  • Previous by thread: Re: standard user or admin user ?
  • Next by thread: Re: AXUIElementPostKeyboardEvent - not sending key presses to Safari/TextEdit in Lion
  • Index(es):
    • Date
    • Thread