According to Adobe's "Document Management - Portable Document Format - Part 1: PDF 1.7" ( Pdf32000_2008.pdf ), section 12.3.2.1 sets the states
The purpose determines the specific presentation of the document, consisting of the following items:
Page of the document to be displayed
Location of the document window on this page
The coefficient of increase (increase)
Example:
[page /XYZ left top zoom]
But in my code
CGPDFArrayGetObject(dArray, 0, &dObj)
is CGPDFDictionaryRef .
93 0 obj << /Type /Annot /Subtype /Link /Rect [71 717 190 734] /Border [16 16 1] /A << /Type /Action /S /GoTo /D [3 0 R /FitR β4 399 199 533] >> >> endobj
How can I get 3 0 R from /D [3 0 R /FitR β4 399 199 533] ?
How can I get an indirect link to a page object, such as a [page /XYZ left top zoom] page object?
Here is my code:
CGPDFPageRef pdfPage = CGPDFDocumentGetPage(pdfRef, pageNum); CGPDFDictionaryRef pageDictionary = CGPDFPageGetDictionary(pdfPage); CGPDFArrayRef outputArray; if(CGPDFDictionaryGetArray(pageDictionary, "Annots", &outputArray)) { int arrayCount = 0; arrayCount = CGPDFArrayGetCount(outputArray ); if(arrayCount>0) { for( int j = 0; j < arrayCount; ++j ) { CGPDFObjectRef aDictObj; if(CGPDFArrayGetObject(outputArray, j, &aDictObj)) { CGPDFDictionaryRef annotDict; if(CGPDFObjectGetValue(aDictObj, kCGPDFObjectTypeDictionary, &annotDict)) { CGPDFDictionaryRef aDict; if(CGPDFDictionaryGetDictionary(annotDict, "A", &aDict))
Thank you so much for re-playing, but I have a question where can I know that this object number is 3?
CGPDFArrayGetObject(dArray, 0, &dObj)
get CGPDFDictionaryRef, but I did not find the field is "3 0 R"
and one more question: if I know, this is "3 0 R"
where can I find by doing a PDF search for 3 0 obj
Thank you, thank you, very very ... I hope your answer will be Hagian!