PDEContent Does Not Contain Any Text.
Hi,
I have a very simple pdf with one line of text. If I use the PDWordFinder the text can be iterated word for word. However, if I try to use PDEContent then it is, so far, impossible to iterate through.
The code below shows the problem, the PDEContent has one element which is not text, rather PDEObjectGetType() returns 12. Not sure what is going on - am using VS 2019 to create a 64-bit plug-in.
AVDoc avDoc = AVAppGetActiveDoc();
AVPageView pageView = AVDocGetPageView(avDoc);
PDPageNumber pageNum = AVPageViewGetPageNum(pageView);
/* Bridge method to PD doc*/
PDDoc pdDoc = AVDocGetPDDoc(avDoc);
/* Acquire current page */
PDPage pdPage = PDDocAcquirePage(pdDoc, pageNum);
PDEContent pdeContent = PDPageAcquirePDEContent(pdPage, gExtensionID);
ASInt32 eleNum = PDEContentGetNumElems(pdeContent);//returns 1
PDEElement pdeElement = PDEContentGetElem(pdeContent, 0);
ASEnum8 test= PDEObjectGetType((PDEObject)pdeElement);//returns 12
if (PDEObjectGetType((PDEObject)pdeElement) == kPDEText)//does not enter
{
}
