Hello,
I recently started using Foxit PhantomPDF (Standard Edition, ver. 7.2.0.722) and I am trying to use the JavaScript console to import form field data from a tab delimited text file. I created two fields on my PDF, named Field1 and Field2, and I am attempting to run the following code:
var myvar = this.importTextData("/c/Users/sbarry/Desktop/abc123.txt", 0)
console.println(myvar)
When I run this through the JavaScript Console, it returns "undefined". According to the documentation I have seen, the importTextData method should have a return code ranging from -3 to 3. I have also tried running this function with no arguments, which is supposed to bring up a file selection dialog, but I am also unable to make that work. The console simply says "It runs successfully".
I made sure that "Enable JavaScript Actions" is checked under the Trust Manager tab of Preferences, and I even added C:\Users\sbarry\Desktop as a privileged location under Security.
I am very new to javascript so I don't know if perhaps I am missing some kind of library files or something, or maybe these commands just aren't built-in to Foxit? Any help would be greatly appreciated.
Thanks
I recently started using Foxit PhantomPDF (Standard Edition, ver. 7.2.0.722) and I am trying to use the JavaScript console to import form field data from a tab delimited text file. I created two fields on my PDF, named Field1 and Field2, and I am attempting to run the following code:
var myvar = this.importTextData("/c/Users/sbarry/Desktop/abc123.txt", 0)
console.println(myvar)
When I run this through the JavaScript Console, it returns "undefined". According to the documentation I have seen, the importTextData method should have a return code ranging from -3 to 3. I have also tried running this function with no arguments, which is supposed to bring up a file selection dialog, but I am also unable to make that work. The console simply says "It runs successfully".
I made sure that "Enable JavaScript Actions" is checked under the Trust Manager tab of Preferences, and I even added C:\Users\sbarry\Desktop as a privileged location under Security.
I am very new to javascript so I don't know if perhaps I am missing some kind of library files or something, or maybe these commands just aren't built-in to Foxit? Any help would be greatly appreciated.
Thanks
Comment