¡@

Home 

2014/10/15 ¤U¤È 10:03:40

iphone Programming Glossary: annotdict

How to get image from FileAttachment Annotation in pdf file

http://stackoverflow.com/questions/18574559/how-to-get-image-from-fileattachment-annotation-in-pdf-file

pageDictionary Annots outputArray pdfAnnots release return nil CGPDFArrayRef rectArray if CGPDFDictionaryGetArray annotDict Rect rectArray break int arrayCount CGPDFArrayGetCount rectArray CGPDFReal coords 4 for int k 0 k arrayCount k CGPDFObjectRef.. 1 coords 2 coords 3 NSLog @ @ NSStringFromCGRect rect Update CGPDFDictionaryRef aDict if CGPDFDictionaryGetDictionary annotDict AP aDict CGPDFStreamRef textStringRef33 if CGPDFDictionaryGetStream aDict N textStringRef33 UIImage image getImageRef textStringRef33.. this question finally get solution CGPDFDictionaryRef aDict NSData imagedata nil if CGPDFDictionaryGetDictionary annotDict FS aDict CGPDFDictionaryRef embeddedFiles if CGPDFDictionaryGetDictionary aDict EF embeddedFiles CGPDFStreamRef streamDict..

Get PDF hyperlinks on iOS with Quartz

http://stackoverflow.com/questions/4080373/get-pdf-hyperlinks-on-ios-with-quartz

j 0 j arrayCount j CGPDFObjectRef aDictObj if CGPDFArrayGetObject outputArray j aDictObj return CGPDFDictionaryRef annotDict if CGPDFObjectGetValue aDictObj kCGPDFObjectTypeDictionary annotDict return CGPDFDictionaryRef aDict if CGPDFDictionaryGetDictionary.. j aDictObj return CGPDFDictionaryRef annotDict if CGPDFObjectGetValue aDictObj kCGPDFObjectTypeDictionary annotDict return CGPDFDictionaryRef aDict if CGPDFDictionaryGetDictionary annotDict A aDict return CGPDFStringRef uriStringRef.. aDictObj kCGPDFObjectTypeDictionary annotDict return CGPDFDictionaryRef aDict if CGPDFDictionaryGetDictionary annotDict A aDict return CGPDFStringRef uriStringRef if CGPDFDictionaryGetString aDict URI uriStringRef return CGPDFArrayRef rectArray..