Quantcast
Channel: Adobe Community: Message List - Acrobat SDK
Viewing all articles
Browse latest Browse all 10848

How to extract named destination with page numbers from the pdf document

$
0
0

Hello,

 

  

            I want to extract named destination along with page numbers.

            I have implemented the code to get named destination as follows:

               PDDoc pdDoc = AVDocGetPDDoc(AVAppGetActiveDoc());
               CosDoc cosDoc = PDDocGetCosDoc(pdDoc);
               CosObj cosObj = CosDocGetRoot (cosDoc);

               CosObj cosDictNames = CosDictGet( cosObj, ASAtomFromString( "Names" ) );
                for( int iIndex = 0; iIndex < iDestCount;  )
                {

                           //Here am getting named destination value by using  CosStringValue

                           //but I want to get the page number

                                //My code as follows to get the page number
 
                      CosObj arrayEntry = CosArrayGet(cosDictNames, 1);
                      CosObj cosDValue = CosDictGet(arrayEntry, ASAtomFromString("D"));

                      CosObj cosPageValue = CosArrayGet( cosDValue, 0 );

                          //if(CosObjGetType(cosPageValue) == CosDict )  The value is dictionary

                      CosObj pagevalue = CosDictGet(cosPageValue, ASAtomFromString("Page"));
 

           }


cosobject is dictionary, how to get the page number from this.

Please help me to solve this issue.

Thanks,

Shilp


Viewing all articles
Browse latest Browse all 10848

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>