Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is an action in Automator that allows you to programmatically "Extract PDF Text", but it fails when fed a moderate amount of files (25 to 100). Worse, it fails without logging anything helpful except for a message that "Automator Quit Unexpectedly".

Does anyone know of an equivalent command for doing this in Applescript? I am looking for tools where I have more control over things like logging and error handling so I can be more efficient in processing PDF files into a text format.

share|improve this question
To avoid trivial answers like "yes" and "no" and perhaps, use Applescript to call an Automator app to perform the extraction, please consider explaining why Automator isn't the tool for you. The more "why" you can add, the easier it is for someone to answer. You don't need to do anything, though - someone might have just the answer you seek with the details provided. – bmike Apr 30 '13 at 13:05
@bmike part of the issue is that automator keeps crashing when I try to implement the text extraction workflow...and the crashes seem "random". i.e., the workflow will iterate through a different # of PDF files, extracting text nicely and then Automator will die with "Automator Quit Unexpectedly"...So...Automator isn't doing the trick...I may be able to add error handling if specific PDF files are causing the crashes (which doesn't seem likely), but in the end Applescript gives me finer control over what I'm doing. – user141146 Apr 30 '13 at 13:42
@bmike...thanks for the edit. – user141146 Apr 30 '13 at 13:52
@user141146 You could try – Simon Apr 30 '13 at 13:53

I don't know how it compares against other options, but you could use pdfotext. It can be installed with brew install xpdf.

do shell script "/usr/local/bin/pdftotext /usr/share/doc/bash/bash.pdf -" without altering line endings

Calibre also comes with some command line utilities:

/Applications/ /usr/share/doc/bash/bash.pdf /tmp/output.txt

Related questions:

share|improve this answer
Thanks for these suggestions as well. – user141146 Apr 30 '13 at 13:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.