iPhone:如何从文档中获取 PDF 文档的标题?
假设我已经使用 iPhone SDK 从 PDF 文档中提取了 CGPDFDictionaryRef,如何从词典中获取文档的标题?更一般地说,我如何获取该词典的关键字列表?理论上我可以问客户,但肯定有一些规范的关键词吧?某处有一个列表吗?
更新:我找到了这个链接,它提供了常用密钥。要回答我自己的问题,您可以直接在 CGPDFDocumentGetInfo(pdfDocumentRef) 返回的字典中查找这些内容。
Assuming I have extracted the CGPDFDictionaryRef from a PDF document using the iPhone SDK, how do I get the document's title from the dictionary? More generally, how can I get a list of the keywords for that dictionary? In theory I could ask the customer, but surely there must be some canonical keywords? Is there a list somewhere?
Update: I found this link which gives the common keys. To answer my own question, you can look these up directly in the dictionary returned by CGPDFDocumentGetInfo(pdfDocumentRef).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您要查找的字典键是
kCGPDFContextTitle
。这是您的
编辑:我不确定。我实际上并没有使用 CGPDF——只是根据其他 Apple 框架的工作方式进行了有根据的猜测。
The dictionary key you're looking for is
kCGPDFContextTitle
.Here's your list of keys.
Edit: I'm not sure. I haven't actually used CGPDF -- was just giving an educated guess based on how other Apple frameworks work.