0

I want to save the content of UIWebView as an image. The code I have only saves the content of the webpage that is visible on the screen.

- (IBAction)saveImage:(id)sender
{
    UIGraphicsBeginImageContext(webCanvas.frame.size);
    [self.webCanvas.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *viewImage =UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    UIImageWriteToSavedPhotosAlbum(viewImage, nil,nil,nil);
}

I want it so it will save the whole webpage in the UIWebView including the part of the website that is not visible on screen. Is this possible?

Piyush Dubey
  • 2,416
  • 1
  • 24
  • 39
X0r0N
  • 1,816
  • 6
  • 29
  • 50
  • 2
    the strategy should be something like... make a UIWebView that is big enough to render everything... render that to an offscreen context, save that as an image... if some part of that doesn't work your job gets harder. – Grady Player Dec 27 '13 at 05:10

1 Answers1

0

You will need to check these:-
Convert UIWebview contents to a UIImage when the webview is larger than the screen
How to take an iPhone screenshot of entire view including parts off screen?
Hope this will help you.

Community
  • 1
  • 1
Piyush Dubey
  • 2,416
  • 1
  • 24
  • 39