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

How to export/import PDF's data with java script?

Explorer ,
Jan 02, 2019 Jan 02, 2019

Good evening, I am trying to create a way to export, and import PDF's data with java script. 

Here is what I have so far in terms of code:

this.extractPages({

    nStart: this.numPages-1,

    cPath: 'C:\Users\dell\Documents\Adobe REC complete' + this.documentFileName

});

this.closeDoc(false);

It will delete the pages but not export the data to the specified folder. 

The java script runs after deleting all-but-one page, so perhaps my 'this.numpages' is wrong

TOPICS
Acrobat SDK and JavaScript , Windows
981
Translate
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 , Jan 02, 2019 Jan 02, 2019

The way you specified the file-path is incorrect. You need to use the following format:

cPath: '/C/Users/dell/Documents/Adobe REC complete' + this.documentFileName

Translate
Community Expert ,
Jan 02, 2019 Jan 02, 2019

The way you specified the file-path is incorrect. You need to use the following format:

cPath: '/C/Users/dell/Documents/Adobe REC complete' + this.documentFileName

Translate
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 ,
Jan 02, 2019 Jan 02, 2019

I went and changed the file-path to the correct version, it now prompts for me to save it before closing the file down.

It seems that "this.extractpages" is not what I need to export the form data, which makes much more sense.  I believe I have the wrong line of code

Translate
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 02, 2019 Jan 02, 2019

If that folder is called "Adobe REC complete" then you need to add another forward-slash at the end of it...

Translate
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 ,
Jan 02, 2019 Jan 02, 2019
LATEST

Your suggestion worked, and the file is now in the folder it's directed to be in.

Thank you

Translate
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