These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

app.newDoc() is not a function Error

ChrisFreeman
Registered: May 6 2007
Posts: 19
Answered

I am testing out some basic code in the Console window. When I execute:

var myDoc = app.newDoc();

I get the following error in the console window:

app.newDoc() is not a function
1:Console:Exec

This error is output to the console window 16 times before the proper "undefined" return message. After these errors, a new document is opened in Acrobat as expected.

I am seeing the same errors when using app.openDoc as well.

Has there been some change to the debugger, console window, or privilege rights?

I am running Acrobat 8.2.3 on Windows XP Pro, Ver 2002, SP2.

My Product Information:
Acrobat Pro 8.1.7, Windows
UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
There's been no change (newDoc and openDoc should both work fine in A8 and A9 - it can take a second or two for the function to return of course, as the PDF is opened, but there shouldn't be any errors). Do you have any plugins loaded into Acrobat, or anything non-standard about your install?
ChrisFreeman
Registered: May 6 2007
Posts: 19
I removed all plug-ins and folder JavaScripts and still saw the error. However, the error seems to be fixed when I replaced the existing JSByteCodeWin.bin file with a newer version I got on forums.adobe.com (http://kb2.adobe.com/cps/853/cpsid_85367/attachments/JSByteCodeWin.bin). I now believe that the bin file has been corrupted by a third-party PDF plug-in I had installed.