Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Struggling with importTextData () ...

New Here ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

Hello experts,

I'm a novice when it comes to Javascripts, but have managed to learn enough to put together a code to automate a form that I have created using Acrobat Pro.  I have successfully executed this, and by this I mean the script runs fine when I click a button on the form - it gets the value from a text file at a specified location and populates the imported row in the correct fields - when I run this using Acrobat Standard or Acrobat Pro (of course I had to include the path names and file names under Preferences .. Security (enhanced)).

Since this form is going to be distributed and many may have just Acrobat Reader, I tried to import data from the text with the form opened on Acrobat Reader.  I got a message back saying that the security settings disallowed this method.  At this point I included the path names, file names under Preferences ... Security (enhanced) for Acrobat Reader as well.  The I made sure I quit Reader, insured that no Acrobat process was running (in the Task Manager), and restarted Reader.  Now I was hoping with the documents in the security center marked as trusted I would be able to execute the form - it continues to fail with the same message (Acrobat EScript Built-in Functions Version 11.0; Acrobat SOAP 11.0; NotAllowedError: Security settings prevent access to this property or method.

Doc.importTextData:8:Field DF2QSS:Mouse Up).

Just FYI, I did not need any folder level scripts for this to run when using Acrobat Standard or Pro.  What am I doing wrong or not doing?  How do I overcome this stumbling roadblock?  Your help in getting this is indeed appreciated.

Thanks.

Sid

Views

2.4K
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
community guidelines

correct answers 1 Correct answer

LEGEND , Jan 26, 2018 Jan 26, 2018

LiveCycle is a suite of products. The one you need is LiveCycle Reader Extensions. The one you have is LiveCycle Designer, which will not help in the slightest. The advice stands: cheaper to get Acrobat for everyone. Unless you have more than a few hundred end users.

Votes

Translate
Community Expert ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

The document must have Form Rights. You can add the rights to the document with a LiveCycle server product.

Votes

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
community guidelines
New Here ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

Thanks for the quick reply.  I'm just guessing that there is cost associated with this.  I recall reading somewhere that it could be astronomical (the exact opposite of economical - as in free).  Now are there other alternatives that I can employ so people with only Reader can also use this Form?  Will I be able to use the folder level scripts or user level scripts as a workaround?  Can you guide me with some examples?  I have seen a lot of discussion about folder level scripts, and have even created one.  I did copy my MyScript.js file to the Javascript under Reader to no avail - but then the script may not be correct.  The script I used is this ...

//Application folder level function

MyTeamData = app.trustedFunction(function(oDoc, cPath, cRow)

{

app.beginPriv();

oDoc.importTextData(cPath, cRow);

app.endPriv();

}

);

//End of application folder level function

//The button on the Form has this code ...

this.MyTeamData(this, "/C/Temp/teamdata.txt", 0);

Thanks for your help.

--Sid

Votes

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
community guidelines
Community Expert ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

This doesn't work. You will get the same message with Acrobat Reader.

Votes

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
community guidelines
New Here ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

Yay! I just discovered that I have LiveCycle ES2 that came bundled with my Acrobat X Pro.  Now how do I go about adding rights to the document created with another version of Acrobat?  The reason I'm asking is because when I opened the Form in LCES2, it imported the Form as images with the fields and labels intact.  However, the script was commented out.  I undid the comment and tried to run, it failed and said not a valid code or something like it.  Please help!

--Sid

Votes

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
community guidelines
Community Expert ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

LiveCycle Designer can't add the rights.

Votes

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
community guidelines
New Here ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

How do I write the script in LiveCycle E2?

I have redesigned the form in LiveCycle and have the exact same fields and a button.

Now how do I connect my script to the button?  Or is it not possible to do this?

//The button on the Form has this code ...

this.importTextData("/C/Temp/teamdata.txt", 0);

Votes

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
community guidelines
Community Expert ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

Post this query in the forum for LiveCycle Designer.

Why do you use LiveCycle Designer now?

Votes

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
community guidelines
LEGEND ,
Jan 26, 2018 Jan 26, 2018

Copy link to clipboard

Copied

LATEST

LiveCycle is a suite of products. The one you need is LiveCycle Reader Extensions. The one you have is LiveCycle Designer, which will not help in the slightest. The advice stands: cheaper to get Acrobat for everyone. Unless you have more than a few hundred end users.

Votes

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
community guidelines
Community Expert ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

It will probably be much more cost-effective to simply get Acrobat for everyone, instead of getting the right to be able to do it in Reader.

Votes

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
community guidelines
New Here ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

Thanks.  If my LCES2 doesn't solve this issue I guess that will be the only choice.

Votes

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
community guidelines