In our application sometimes there is a need to show webview content as a Convert HTML Content into Image to Show WebView in ObjectiveC iOS App. HTML in UIWebView on iOS is rendered at 72dpi – it’s fine for displaying on screen but when you file for printing using. And in upcoming post I will share a tutorial with you where you can convert your website to Simple iOS Application using WebView. Thank You.
|Genre:||Health and Food|
|Published (Last):||11 July 2013|
|PDF File Size:||18.22 Mb|
|ePub File Size:||2.61 Mb|
|Price:||Free* [*Free Regsitration Required]|
Very similar to this question and also this answerI’m trying to make an UIImage out from a webview. So far I’m using the code suggested in the answer, specifically:. However, when the uiwebviwe of the webview are larger than the screen, the resulting images are not complete and have missing patches.
Any ideas on how to fix this? You have to set the frame of the Webview to the full content size just before you create the image. After this just set the size back to origin:. D R’s answer uiebview fine. The only thing missing is taking into account the scale of screen.
So far I’m using the code suggested in the answer, specifically: Matt Blackmon 1 8 I got the answer: After this just set the size back to origin: I like it so much when ppl post the answer after they got it.
BTW, I just wonder – why is that a singleton and not just a function? What I do is to add a “category” for UIImage and declare this method for it. Alexander 2 10 Jibeex 2, 1 14 Jibeex’s answer worked for me.
How to load a HTML string into a WKWebView or UIWebView: loadHTMLString()
But I had to add the following code fullSizeFrame. Writing as answer because I don’t have enough reputation to comment.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.
What’s the difference between UIWebView and WKWebView? – free Swift example code and tips
Post as a guest Name. Email Required, but never shown.