Adobe Acrobat – Export All PDF Files as Text

adobe-acrobatexportpdf

Question: How do I get Adobe Acrobat Pro DC to export all PDF files in a folder as text files ?

Using the Action Wizard on the Tools menu of Adobe Acrobat Pro DC I was able to create a custom command which allowed me to export (OCR) thousand of images as pdf files. I now want to export those images; which are now searchable as text files. However I cannot seem to find a similar set of tools to do this.

Note: There is an export button that allows me to export files one-at-a-time as a text file but I cannot seem to find something that will allow me to run a command on entire folder.

EDIT: I called customer support and a possible work around is to combine all the files into one giant PDF file and then export the pdf file. On the other hand I need a separate ID for each pdf file exported as text so that is not an option.

Best Answer

You may use PowerShell combined with Xpdf.

Xpdf will install a program called pdftotext, which can be invoked from a PowerShell script such as:

$FILES= ls *.pdf
foreach ($f in $FILES) {
    & "C:\Program Files\xpdf\bin32\pdftotext.exe" -enc UTF-8 "$f"
}

A similar batch script can be invoked from a .bat file without using PowerShell:

for /f %%G in ('dir /b') do {
  "C:\Program Files\xpdf\bin32\pdftotext.exe" -enc UTF-8 "%%G"
)

(Note: None of the scripts was tested.)