I have two PDF documents (doc1 and doc2) with hyperlinks, for example www.somlink.com, www.somlink2.com. According to the PDF specification, I can get these hyperlinks through Link Annotations. The Annotations link can be found in the PDF dictionary in the Annotations section.
CGPDFDictionaryRef pageDictionary = CGPDFPageGetDictionary(someCGPDFPage);
CGPDFArrayRef annots;
CGPDFDictionaryGetArray(pageDictionary, "Annots", &annots);
So, the problem is that in one pdf document (doc1) I get this array of "Annots", but in another document (doc2) there is no such entry in the page dictionary. And the fact is that with the help of PDFKit.framework you can get these annotations in the PDFPage class using the annotation method - (NSArray *), even if there is no "Annots" entry in the page dictionary.
I can not use PDFKit.framework on iPad / iPhone, so I work with Quartz framework :)
So, it seems that there is another place where you can specify hyperlinks (or Link Annotations in the PDF Reference), and not only in the Annots array, but in PDFKit.framework you somehow know how to do this.
Any ideas where I can get these hyperlinks?
Koteg source
share