Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Incorrect PDEObject Type Exception.

New Here ,
Sep 22, 2016 Sep 22, 2016

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

}

TOPICS
Acrobat SDK and JavaScript
2.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 22, 2016 Sep 22, 2016
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines