ReferenceError: OptionsOnSec is not defined

New Here ,
Sep 06, 2018

Copy link to clipboard

Copied

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

Views

210

Likes

Translate

Translate

Report

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

ReferenceError: OptionsOnSec is not defined

New Here ,
Sep 06, 2018

Copy link to clipboard

Copied

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

Views

211

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 06, 2018 0
Adobe Community Professional ,
Sep 07, 2018

Copy link to clipboard

Copied

You should find more help in the Acrobat SDK forum, since it is more orientated to accessing PDFs through other languages.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 07, 2018 0
Most Valuable Participant ,
Oct 10, 2018

Copy link to clipboard

Copied

Acrobat is an interactive tool with some tools for light duty automation. That is far too many files. Quit Acrobat every 20-50.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 10, 2018 1