3

i am having 1000 valid and working pdf files. followed the below steps to convert a pdf to text file in Acrobat Redear Pro

  1. Open Adobe Acrobat Pro
  2. Tools -> Action Wizard - Create New Action - Add the files to be converted ->
  3. Go to More Tools - Double Click Execute Java Script - Click Save -> Give a action Name (any name)
  4. The created new action will be listed under Actions and click the same - Click start -> Paste the below Javascript and change your output folder. c/MyFiles/Ouput is the output folder where the converted files will be stored

/* PDF to Text */

this.saveAs("/c/MyFiles/Output" + this.documentFileName + ".txt","com.adobe.acrobat.plain-text");

Note: Each time a window is poping-up once the first file is done..then it goes 1, 3, 5

Note: Is there is anyway to do a bulk convesion - like 1000 pdf files to a folder where text fill be generated.

Please let me know your feeback.

Thanks, Kathir

2 Answers2

5

You can do it in Acrobat Pro without bothering with javascript.

In Acrobat Pro :

  1. View -> Tools -> Action Wizard -> Create new Action
  2. Choose 'Save & Export' -> Save -> add to right hand pane.
  3. At right hand pane -> choose folder to process and click 'Specify Settings' button to change export format to TXT

Note : I didn't see encoding option here.

loki
  • 9,816
  • 7
  • 56
  • 82
UNn
  • 51
  • 1
  • 3
3

You can use the Action Wizard of Acrobat Pro (actually Acrobat XI Pro), to create an Action which does include your JavaScript. Then you can apply that Action to individual files, or whole directories.

You may also verify if the Action wizard would allow you sufficient control over the output file name. If so, you may not even need the JavaScript.

Max Wyss
  • 3,549
  • 2
  • 20
  • 26
  • That's correct..The problem is i am not sure about te action script which can apply for whole directories. could you please help me with the action script which process whole directories instead of a single file??? please help me..any help to process whole directory is what i need.. – Kathiresan Jeyapandian Aug 09 '14 at 10:27
  • This is a setting when you set up the Action in the Wizard. You are asked when to run the action, and there, you can specify directories (or you specify a directory if you have set it to "ask" (or something similar)) – Max Wyss Aug 09 '14 at 11:05
  • I have resolved the issue by the option provided by the Adobe Acrobat - "Save As" option which is used to specify the directory where the converted file needs to be saved..Anyway thanks for the answer Max – Kathiresan Jeyapandian Sep 24 '14 at 16:29
  • Is it possible to set the encoding of the text files? I can't set the encoding to UTF-8, and it seems the default encoding for the converted text files were ANSI. Any ideas where to set this? – euler May 09 '15 at 11:09