I want to save a screenshot or generate a PDF from UIWebView text content. I know about screenshots as it has been mentioned in:
It is a matter of that I want to screenshots in 300 dpi. This is a definite requirement for generating content in UIWebView.
I thought about creating a touch to zoom into UIWebView, create several screenshots at high zoom and stitch them together.
Do anyone have more elegant solutions?
Thanks b00tsy
The thing is that I have screenshots in 300 dpi This is a definite requirement for generating content in a UIWebView.
I'm not sure that it can be done easily.
Uses UIWebView WebKit It appears to render tiles in the background and some pre-rendering, but if you scroll quickly, you can sometimes See the tiles that were not presented adequately soon. WebKit is not an easy way to know how to render the page.
At least ugly way may be to generate a big-to-fullscreen UIWebView and present its layer. Setting up scalesPageToFit = Yes
can be helpful.
Also keep in mind that UIWebView takes the screen resolution when rendering (i.e. it renders higher on iPhone 4), that means you will get better results on iPhone 4 / iPod Touch 4g. It also means that you may be able to "move" UIWebView, thinking that the screen is actually higher-reserve than it is (you set the WebV.layer.contentsSecale to OS 4.0++ Can achieve success)
(And FWI, "300 dpi" is an ambiguous requirement & mdash; "Retina Display" is more than 300 ppi.)
Comments
Post a Comment