Copy link to clipboard
Copied
Hi all,
I also take time to check to see if my question has been answered but I cannot find anything that matches the issue that I am having.
I am using this:
this.importTextData();
to prompt the user to select the .txt file to import into a fillable pdf document. There are no errors that appear and by the looks of it it works fine. However no data actually imports. Here is the strange thing, if i do the import process manually (Prepare Form -> More -> Import -> change to text files (*.txt) and select the exact same file I tried to in the this.importTextData(); process it works with out any issues and all the data imports.
So I know it is not an issue with the .txt file and that the Text Field Properties Names are fine. Is there something that is wrong with the "this.importTextData();" that is incorrect?
Any help would be great. Thanks all in advance.
Copy link to clipboard
Copied
Where do you use script?
It needs to be run from privileged context.
Copy link to clipboard
Copied
Thanks Nesa for the prompt reply.
I have it in a button on the pdf fillable form. This could very well be the issue.
Is there an easy fix?
Copy link to clipboard
Copied
Look at the Javascript console (ctrl-j).
Copy link to clipboard
Copied
Are you testing it in Acrobat, or in Reader? For the latter a special right has to be applied to the file first, which I don't believe you can do with just Acrobat.