简体   繁体   English

CGPDF函数与iBooks PDF渲染

[英]CGPDF functions vs iBooks PDF rendering

I'm making a PDF reader and it works pretty good with most PDFs. 我正在制作一个PDF阅读器,它适用于大多数PDF。 While testing with a bunch of different documents (on an iPad), I've found one that crashes the app - it makes heavy use of vector graphics and images so I'm not surprised. 在测试一堆不同的文档(在iPad上)时,我发现了一个崩溃应用程序 - 它大量使用矢量图形和图像,所以我并不感到惊讶。 I also bought a bunch of PDF readers (most notably Good Reader and ReaddleDocs) to test them with this document, and they all freeze for three or four seconds and then crash. 我还买了一堆PDF阅读器(最着名的是Good Reader和ReaddleDocs)来测试它们,并且它们都会冻结三到四秒然后崩溃。

Now the problem: I just tried it on iBooks and it works flawlessly. 现在的问题是:我只是在iBooks上试过它,它完美无瑕。 How's this possible? 这怎么可能? Maybe Apple doesn't use the CGPDF set of functions like all other apps do? 也许Apple没有像所有其他应用程序那样使用CGPDF功能集? Or maybe there's something I don't know, like some open source PDF rendering library that could be used instead? 或者也许有一些我不知道的东西,比如一些可以用来代替的开源PDF渲染库? (I couldn't find any). (我找不到任何)。

Update: I ended up re-exporting the PDF and now it works fine, but I'll still like to know why iBooks can handle the old one perfectly. 更新:我最终重新导出PDF,现在它工作正常,但我仍然想知道为什么iBooks可以完美地处理旧的。 :) :)

可能是PDF已损坏,优秀的读者有一个功能(在最后的upadate中)用于修复损坏的pdf文件,可能ibooks会自动执行此操作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM