5
CGPDFDocumentRef名称是否有可能从CGPDFDocumentRef
获取的文件
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 Reference Archives
谢谢,我实际上是指文件名,但我的猜测是,那是不可能的。你碰巧知道从元数据中检索创建日期的关键吗? – Thys 2011-05-06 14:30:37
“CreationDate”,并且还有一个“ModDate”。 – 2011-05-06 14:53:01