• 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
How to get image of a WebView???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to get image of a WebView???


  • Subject: How to get image of a WebView???
  • From: mradul mandhanya <email@hidden>
  • Date: Wed, 16 Feb 2005 04:50:02 -0800 (PST)
  • Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys

hi all

i am very nw to cocoa programming...and to this grp
too  and i have searched teh archive 4 this but
couldnot find a result of my prob....

i have a problem while getting the image or a pdf of a
web view.

i have got the pdf but due to some reason(dont know
why) it is not showing the exact content of the web
site (i tried it with both options direct writing to
pdf or priting to pdf - actually safari itself is not
saving the exact content of the website to PDF ).

i tried to make the TIFF image of the view with
following code :


[[[[[vc webView] mainFrame] frameView] documentView]
lockFocus];

bitmap = [[NSBitmapImageRep alloc]
initWithFocusedViewRect:[[[[[vc webView] mainFrame]
frameView] documentView] frame]];

[[[[[vc webView] mainFrame] frameView] documentView]
unlockFocus];

[[bitmap TIFFRepresentation]
writeToFile:@"webViewImage.TIFF" atomically:YES];


where vc is my outlet to webView... & right now just
testing to save the image to the disk with name
webViewImage.TIFF .


but the problem with this method is that it is giving
me the image of visible protion of the webView only
:-((

Can anyone plzzz suggest me a better way to get image
        from a WebView or any view ... which also
includes the portion which is not visible at present.


Thanks a lot!!!!

Pintoo



__________________________________
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to get image of a WebView???
      • From: Stephan Burlot <email@hidden>
    • Re: How to get image of a WebView???
      • From: Guy English <email@hidden>
  • Prev by Date: RE: Re: Sorting
  • Next by Date: Re: Interface Builder/XCode strangeness with changing the type of buttons on an NSMatrix
  • Previous by thread: Re: NSUserdefaults shared by 2 applications, not synchronized ?
  • Next by thread: Re: How to get image of a WebView???
  • Index(es):
    • Date
    • Thread