Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2010
2,802
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - (void)parseHyperlinks:(CGPDFDocumentRef)doc {
  2.     for(int i=0; i<pageCount; i++) {
  3.         CGPDFPageRef page = CGPDFDocumentGetPage(doc, i+1);
  4.        
  5.         CGPDFDictionaryRef pageDictionary = CGPDFPageGetDictionary(page);
  6.        
  7.         CGPDFArrayRef outputArray;
  8.         if(CGPDFDictionaryGetArray(pageDictionary, "Annots", &outputArray)) {
  9.             int arraycnt = CGPDFArrayGetCount( outputArray );
  10.             for( int i = 0; i < arraycnt; ++i )
  11.             {
  12.                 CGPDFObjectRef aryobj;
  13.                 if( CGPDFArrayGetObject( outputArray, i, &aryobj ) )
  14.                 {
  15.                    
  16.                     //DumpObject( tmp, aryobj, NULL );
  17.                 }
  18.             }
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement