【发布时间】:2015-08-08 11:58:58
【问题描述】:
在我的 iOS 应用程序中,我需要从我的 webview 内容创建一个 pdf 文档。我看了这些帖子:Creating PDF file from UIWebView 和 https://coderchrismills.wordpress.com/2011/06/25/making-a-pdf-from-a-uiwebview/
我想知道是否有更简单的方法可以做到这一点。例如,对于我的 Mac 项目,我使用这个:
NSData *pdf = [[[[webView mainFrame] frameView] documentView] dataWithPDFInsideRect:[[[webView mainFrame] frameView] documentView].frame];
PDFDocument *doc = [[PDFDocument alloc] initWithData:pdf];
在 iOS 中是否有任何简单的方法可以做到这一点?
从 webview 内容中获取最佳质量的 pdf 文档的最佳选择是什么?
【问题讨论】: