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

ReferenceError: OptionsOnSec is not defined

New Here ,
Sep 14, 2018 Sep 14, 2018

Dear All,

I use Python to call Acrobat JavaScript to convert PDF to EXCEL. The code is like following:

        aApp = win32.Dispatch('AcroExch.App') 

        pdDoc = win32.Dispatch('AcroExch.PDDoc') 

        if pdDoc.Open(r + "\\" + e): 

            jsObject = pdDoc.GetJSObject() 

            jsObject.SaveAs(des + "\\" + e + ".xlsx", "com.adobe.acrobat.xlsx") 

            jsObject = None 

            pdDoc.Close() 

        pdDoc = None 

        aApp.Exit() 

        aApp = None 

I have converted 6000+ PDF successfully without any problem.

But recently when I reused this code to conver another 4000+ PDF, for about 600 PDF, there were errors: "ReferenceError: OptionsOnSec is not defined".  The other PDF are converted successfully without any problem.

I have searched google for this key word "OptionsOnSec" but only found "2 results (0.38 seconds) " and none of them are helpful.  So I think maybe internal forum will be helpful.

Could anyone provide me with any advice?

Thank you so much for your help!

TOPICS
Acrobat SDK and JavaScript
696
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
Community Expert ,
Sep 14, 2018 Sep 14, 2018
LATEST

Are you seeing anything in the Acrobat JavaScript console?

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