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

How to read multiple .pdf files in a loop for batch processing

New Here ,
Aug 19, 2017 Aug 19, 2017

Hi,

I'm trying to create a loop that effectively goes through a folder containing multiple pdf documents. This script is essentially meant to open and extract specific data from each pdf and export it to a single .txt file. The data export script has already been written, but I am having issues with setting up my loop to work through the folder.

This is the general layout of the loop I am currently working with:

while (***FOLDER HAS NEXT FILE***)

{

     var thisFile = ***SAVE FILE NAME AS STRING VARIABLE***

     app.openDoc(thisFile);

     (insert data extraction and export script)

}

If this initial approach is ineffective, or if there is a more efficient alternative, please share! Thank you!

TOPICS
Acrobat SDK and JavaScript , Windows
1.3K
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
LEGEND ,
Aug 20, 2017 Aug 20, 2017

Batch processing/actions step over each file in turn. You do not code this, you just code for each file.

JavaScript run inside Acrobat cannot get a directory listing or next File.

External apps can do this and use IAC.

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
New Here ,
Aug 22, 2017 Aug 22, 2017

What external app would you recommend for this task?

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
LEGEND ,
Aug 22, 2017 Aug 22, 2017
LATEST

You'd write 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