iPhone/iPad 可以像 iBooks 一样绘制 pdf 吗?

发布于 2024-09-25 04:36:22 字数 180 浏览 0 评论 0原文

有谁知道如何使用核心图形来绘制pdf,就像在iBooks中一样。我已经可以使用核心图形绘制 pdf 页面,但很好奇 iBooks 如何显示每个页面的较低质量视图,以便加载速度更快,然后当您在页面上停留更长时间时,它会呈现完整的质量。这使得它能够打开 pdf,而不必像您在 iPad 上看到的大多数杂志应用程序一样让用户等待。任何想法都会有所帮助!

Does anyone know how to use core graphics to draw a pdf like in iBooks. I can already draw a pdf page using core graphics but was curious how iBooks shows a lower quality view of each page so it loads fast and then when you stay on a page longer it renders it a full quality. This makes it able to open the pdf without having to make the user wait like most magazine apps you see on ipad. Any ideas would help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

时光匆匆的小流年 2024-10-02 04:36:22

苹果有一些“ZoomingPDFViewer”示例代码:

http://developer.apple.com/library/ios/#samplecode/ZoomingPDFViewer/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010281

我怀疑这可能会给你一些好主意:-)

Apple have some "ZoomingPDFViewer" sample code:

http://developer.apple.com/library/ios/#samplecode/ZoomingPDFViewer/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010281

I suspect that might give you some good ideas :-)

对不⑦ 2024-10-02 04:36:22

我假设他们使用多个层,第一层以低分辨率加载 pdf,并在后台准备更好的分辨率。准备好后,这些层就会被交换。

查看文档中的 CGPDFDocumentRef 和 CATiledLayer。

I assume they use multiple layers, the first layer loads the pdf in low resolution and the better resolution is prepared in the background. When ready these layers are swapped.

Have a look at CGPDFDocumentRef and CATiledLayer in the documentation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文