views:

91

answers:

1

Hi,

I want to save a screenshot or generate a pdf from UIWebView text content. I know about how to make screenshots like described in:

http://developer.apple.com/library/ios/#qa/qa2010/qa1703.html

The thing is I'd like to have the screenshot in 300dpi. It is a fixed requirement to generate the content in a UIWebView.

I thought about generating touches for zooming into the UIWebView, make several screenshots at a high zoom and stitch them together.

Does anyone have a more elegant solution?

Thanks b00tsy

A: 
tc.
hi tc.,thanks for your response. Am searching for a solution which might render high resolution images on pre-retina-display devices and iPad as well.
b00tsy
>The least ugly way might be to generate a larger-than-fullscreen UIWebView and render its layer. Setting scalesPageToFit = YES might help. Does that mean, that a webview might be bigger than the area on the display and when I render the webview layer I will get a screenshot of the whole webview, with the areas undisplayed by the display?
b00tsy
Yes. It is not a screenshot.
tc.
Hi tc., contentsScale is no option because it expands each pixel to the number defined in contentsScale. The first suggestion works well, but I caused myself some more troubles explained in: http://stackoverflow.com/questions/4027656/render-hidden-webview-as-screenshot-causes-problems . Do you have a clue maybe?
b00tsy