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

How to access the data after this.importTextData("/c/desktop/myData.txt")

Explorer ,
Mar 11, 2021 Mar 11, 2021

Copy link to clipboard

Copied

This is probably a trivial question, but I have no idea how to access the data

after executing this.importTextData.


The contents of myData.txt are

bookmark0      bookmark1    bookmark2
Introduction   Chapter 1    Chapter 2


How do I retrieve the value of "bookmark0" for example?


Thank you in advance.

Tak

TOPICS
Acrobat SDK and JavaScript

Views

760

Translate

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

Community Expert , Mar 11, 2021 Mar 11, 2021

Look at the example in the Acrobat Javascript Reference for this method.

Votes

Translate

Translate
Community Expert ,
Mar 11, 2021 Mar 11, 2021

Copy link to clipboard

Copied

Look at the example in the Acrobat Javascript Reference for this method.

Votes

Translate

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
Explorer ,
Mar 11, 2021 Mar 11, 2021

Copy link to clipboard

Copied

I was expecting that the importTextData() function would import data into a string array or the like. If I have to create fields for every pieces of text I'm trying to import in advance, this is not a viable solution. I'll look for other ways to import text. Thanks.

Votes

Translate

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 ,
Mar 12, 2021 Mar 12, 2021

Copy link to clipboard

Copied

No, it imports it directly into the fields. If you want to read the text as is use readFileIntoStream, and then convert it from a Stream to a string, an split it by line and further by item (depending on the delimiter used in your file).

Votes

Translate

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
Explorer ,
Mar 12, 2021 Mar 12, 2021

Copy link to clipboard

Copied

LATEST

Thank you for the information. Very helpful.

Votes

Translate

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