在iOS中使用Quartz 2d进行注释(注释,注释) [英] Annotation (notes, comments) using Quartz 2d in ios

查看:109
本文介绍了在iOS中使用Quartz 2d进行注释(注释,注释)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为iPad做基于PDF的应用程序.它支持缩略图视图,无用注释和注释(注释). Ya和我在网上进行了大量搜索,但没有找到使用Quartz 2d在PDF上做注释的任何相关答案.

I am doing PDF based application for iPad. It supports thumbnail view, Free hand comment, And annotations (Notes). Ya and I searched lot on net but I didnt find any relevant answer for making annotation on PDF using Quartz 2d.

我们可以使用
获取PDF页面信息 CGPDFDictionaryRef CGPDFPageGetDictionary ( CGPDFPageRef page );
并使用Annots键.
bool CGPDFDictionaryGetArray ( CGPDFDictionaryRef dict, "Annots", CGPDFArrayRef *value );
您可以获取特定页面的注释.如果我是对的,注释的关键是什么,如果有的话,如何更新页面字典.
如果我在上述问题上完全错了,请告诉我注释如何在PDF上呈现.还是PDF渲染器在其中获取有关 Notes 的信息.?
请让我知道是否有人尽快知道.真的非常感谢.

We can get PDF page info using
CGPDFDictionaryRef CGPDFPageGetDictionary ( CGPDFPageRef page );
And using Annots key.
bool CGPDFDictionaryGetArray ( CGPDFDictionaryRef dict, "Annots", CGPDFArrayRef *value );
you can get annotation for particular page. If I am right what is key for Notes and if it is there how to update page dictionary.
If i am wrong at all in above concern please let me know how Notes gets rendered on PDF. Or where PDF renderer gets info about Notes.?
Please let me know If any one knows ASAP. Really thanks in advance.

推荐答案

我目前正在框架中实现注释. Apple根本不评估"Annots"字典-因此,您自己一个人.

I'm currently implementing annotations my framework. Apple doesn't evaluate the "Annots" dictionary AT ALL - so you're on your own.

我基本上重新实现了所有流行的注释类型,以及它们的绘制方式,并编写了自己的解析器,该解析器从每个CGPDFPage的Annots词典中创建了对象.然后在让QuartzCore绘制默认的pdf页面后绘制它们.

I basically re-implemented all popular annotation types, how they are drawn, and wrote my own parser that creates the objects out of the Annots dictionary of each CGPDFPage. Then you draw them after you let QuartzCore draw the default pdf page.

要获取所有键(注释和更多内容),请查看Adobe的PDF参考.相当读(> 1000页).

To get all keys (Notes, and much more), check out Adobe's PDF Reference. It's quite a read (>1000 pages).

不允许我命名我正在使用的框架,因此请单击我的个人资料以查看链接.

I'm not allowed to name the framework I am working on, so click on my profile instead to see the link.

这篇关于在iOS中使用Quartz 2d进行注释(注释,注释)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆