How to get the PDEContainer using PDSMCGetPDEContainer
Hi Team
I want to get the exact location of the figure and formula from the tagged PDF. i am able to read the tagged structure from the PDF using below code, but i got struck ed to get the PDEcontainer by using PDSMCGetPDEContainer. how to obtain the pdecontainer i am i missing anything here?
ASAtom kidType = PDSElementGetKidWithMCInfo(element, //The PDSElement containing the kid that is retrieved
kidIndex, //The index of the kid.
&kid, //The kid being accessed (depending on the kid's type) or NULL.
&mcidInfo,//The kid's information object or NULL.
NULL, //Pointer to the kid or NULL.
&CosPage); //The CosObj of the page containing the kid or NULL
char buf[256], title[128];
buf[0] = title[0] = '\0';
if (kidType == StructElem_K){
ASInt32 title_size = PDSElementGetTitle (kid, reinterpret_cast<ASUns8*> (title));
char IDS[128];
IDS[0] = '\0';
ASInt32 ID_size = PDSElementGetID (kid, reinterpret_cast<ASUns8*>(IDS));
strcat (buf, reinterpret_cast<char *>(IDS));
string CurentName(buf);
if (CurentName.find("Figure") != string::npos)
{
string test(buf);
PDSMC Obj = (PDSMC) mcidInfo.mcid;
PDEContainer pdeContainer = PDSMCGetPDEContainer((PDSMC)Obj);// iam getting error
PDEContent content = PDEContainerGetContent (pdeContainer);
}
GetElemInfo(kid);
}
Thanks,
Balamurugan V
