Creating Paginated PDF from UIWebView

I have a UIWebView that I use to display the stylized NSString HTML that I create. I would like to be able to send paginated pdf pages.

Currently, I can use the printing features of iOS 4.0 to print a beautiful, paginated presentation of all the text in UIWebView. Can I do the same, but instead of printing a PDF, generate an NSData object (or a file in an isolated file system) from an HTML string?

I can already create an UIWebView image, but it is not easily paginated and requires much more work than I consider necessary.

Thanks.

+4
source share

Source: https://habr.com/ru/post/1340735/


All Articles