Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Save the code above in a file called "extract_text.sh"
  • In the terminal, go to the directory where you saved extract_text.sh. For example:
    • cd /Users/me/myscripts
  • Make the script executable with the following command:
    • chmod +x extract_text.sh
  • Put all of your PDFs in a single directory. 
  • Assuming that you put all of your PDFs in /Users/me/mypdfs, and you want to write text output to the directory /Users/me/myplaintext, call extract_text.sh as follows:
    • ./extract_text.sh /Users/me/mypdfs/ /Users/me/myplaintext/
  • If you are working with German-language texts, you can add a language code at the end. For example:
    • ./extract_text.sh /Users/me/mypdfs/ /Users/me/myplaintext/ deu