Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Adobe Acrobat Pro DC action javascript read from txt file.

Avatar

Avatar
Level 1
BogdanFloares
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
BogdanFloares
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
BogdanFloares
Level 1

02-06-2021

I tried to reed from txt in a button action javascript like that:

 

this.importDataObject("test.txt", "C:/Users/user/Desktop/test.txt");
var i = this.getField("rand").value;
var oFile = this.getDataObjectContents("test.txt");
var cFile = util.stringFromStream(oFile, "utf-8");
console.println(cFile);
var lines = cFile.split('\n');

 

I get this error:

RangeError: Invalid argument value.
Doc.importDataObject:1:Field Read:Focus

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 100
Level 10
asutosh_jena
Level 10

Likes

570 likes

Total Posts

687 posts

Correct Reply

197 solutions
Top badges earned
Give Back 100
Boost 500
Affirm 100
Ignite 1
Establish
View profile

Avatar
Give Back 100
Level 10
asutosh_jena
Level 10

Likes

570 likes

Total Posts

687 posts

Correct Reply

197 solutions
Top badges earned
Give Back 100
Boost 500
Affirm 100
Ignite 1
Establish
View profile
asutosh_jena
Level 10

02-06-2021

Hi @BogdanFloares 

 

Please post this question in https://community.adobe.com/t5/acrobat/bd-p/acrobat for faster response.

 

Thanks!

Answers (0)