How to get audio and video link from the pdf?
I have implemented odf reader application for iphone.Now i want to get list of audio url and video url from the pd开发者_StackOverflow中文版f.I dont know how it possible.Please help me for this query.
All right then, with your CGPDFDocumentRef
pointing to a valid PDF Document you could iterate over all available Pages of the Document using the CGPDFDocumentGetNumberOfPages
and the CGPDFDocumentGetPage
functions. The result of the CGPDFDocumentGetPage
function is a CGPDFPageRef
reference. Within the CGPDFPage
API and the CGPDFDocument
API you'll find the CGPDFPageGetDictionary
function which returns you a CGPDFDictionaryRef
reference. It depends on how your PDF is build but in one of those Dictionarys are the informations stored you need. You can call CGPDFDictionaryApplyFunction
function on the Dictionary, passing a function pointer to callback with this signature:
void ApplierFunction (const char *key, CGPDFObjectRef object, void *info);
The callback is called for every key/value pair of the specific dictionary. You should find what you are looking for within one of the CGPDFObjectRef
references.
Also take a look at the Documentation of CGPDFDocument
, CGPDFPage
and CGPDFDictionary
.
精彩评论