Generate Paginated PDF from UIWebView
I've got a UIWebView that I'm using to display a stylized NSString of HTML that I'm generating. I'd like to be able to email a paginated PDF of the displayed page.
Right now, I can use the iOS 4.0 printing features to print a nice, paginated representation of all the text in the UIWebView. Can I do the same, but rather than print the PDF, generate an NSData object (or a file in the sandboxed file system) from the HTML string?
I can already generate an image of the UIWebView, but this开发者_JAVA技巧 doesn't paginate easily and requires a lot more work than I think should be necessary to do this.
Thanks.
精彩评论