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