I'm trying to import text data using the java script command importTextData, and I'm receiving a security error. I checked the item “Enable Menu Items JavaScript Execution Privileges” in Preferences. Is there something else I need to do?
Here's the code I put behind a button on the Acrobat form:
this.importTextData("C:\AcrobatImportTest.txt", 0)
Here's my error:
Acrobat JavaScript Debugger Functions Version 9.0
Acrobat EScript Built-in Functions Version 9.0
Acrobat Annotations / Collaboration Built-in Functions Version 9.0
Acrobat Annotations / Collaboration Built-in Wizard Functions Version 9.0
Acrobat SOAP 9.0
NotAllowedError: Security settings prevent access to this property or method.
Doc.importTextData:1:Field cmdImport:Mouse Up
NotAllowedError: Security settings prevent access to this property or method.
Doc.importTextData:1:AcroForm:cmdImport:Annot1:MouseUp:Action1
NotAllowedError: Security settings prevent access to this property or method.
Doc.importTextData:1:AcroForm:cmdImport:Annot1:MouseUp:Action1
NotAllowedError: Security settings prevent access to this property or method.
Doc.importTextData:1:AcroForm:cmdImport:Annot1:MouseUp:Action1
NotAllowedError: Security settings prevent access to this property or method.
Doc.importTextData:1:AcroForm:cmdImport:Annot1:MouseUp:Action1
Here's my tab delimited text file:
UTMBMedicalRecord PatientName DateOfBirth
123456E "Jones, Bill" 12/7/1951
Have you tried your code in the JavaScript console and what was the result?
If it works from the JS Console, then you need to incorporate it into an application folder level trusted function.
George Kaiser