Skip to main content
Participant
September 22, 2016
Question

Incorrect PDEObject Type Exception.

  • September 22, 2016
  • 1 reply
  • 2339 views

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);

}

This topic has been closed for replies.

1 reply

lrosenth
Adobe Employee
Adobe Employee
September 22, 2016

My guess is that there is some bad content on the page – but without seeing an exact PDF, I couldn’t tell you.