获取文档的CGPDFDocumentRef名称
是否有可能从CGPDFDocumentRef
检索文档的名称
通过“文件的名称”,你的意思是文件的文件名或标题?
如果文档“标题”包含在元数据中,则可以像这样检索:
char *titleKey = "Title"; CGPDFStringRef titleStringRef; CGPDFDictionaryRef info = CGPDFDocumentGetInfo(myDocumentRef); CGPDFDictionaryGetString(info, titleKey, &titleStringRef); const unsigned char *titleCstring = CGPDFStringGetBytePtr(titleStringRef); printf("title: %s", titleCstring);
其他键在PDF 1.7规范的第10.2节中列出: Adobe PDF参考档案