Copy link to clipboard
Copied
In my Adobe Acrobat Plug-In on some very specific data sheets, an exception is thrown "Incorrect PDEObject Type'. This occurs at the execution of the PDEContentGetewtNumElems( pdeContent ) statement. Not sure why I would have an Incorrect PDEObject Type only in very specific files.
---------------------------------------------------------
static void EnumeratePDEElems(PDEElement);
static int outputLimit;
static void PDEPathExplorerSnip( int pageNum )
{
AVDoc CurrentAVDoc = AVAppGetActiveDoc();
if (!CurrentAVDoc ) return;
AVPageView CurrentAVPageView = AVDocGetPageView(CurrentAVDoc);
PDDoc pDoc = AVDocGetPDDoc( CurrentAVDoc );
PDPage pdPage = PDDocAcquirePage(pDoc, pageNum );
if (pdPage == NULL) return;
PDEContent pdeContent = PDPageAcquirePDEContent(pdPage, 0);
PDEElement pdeElem = NULL;
DURING
int cnt = 0;
ASInt32 numElems = PDEContentGetNumElems(pdeContent);
for (int i=0; i<numElems; i++)
{
pdeElem = PDEContentGetElem(pdeContent, i);
EnumeratePDEElems(pdeElem);
cnt++;
}
HANDLER
DPageReleasePDEContent(pdPage, 0);
char buf[256];
ASInt32 err = ERRORCODE;
ASGetErrorString(err, buf, 256);
AVAlertNote(buf);
END_HANDLER
outputLimit = 0;
PDPageReleasePDEContent(pdPage, 0);
}
Copy link to clipboard
Copied
My guess is that there is some bad content on the page – but without seeing an exact PDF, I couldn’t tell you.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now