Automator: Pulling Out Text from PDFs

I’ve mentioned a couple of times before that I think Automator is awesome, and this tip will prove it to you. With less than five minutes of work, you can create an application that’ll extract text from PDFs and drop that text into a file, easy as pie. So to get started, open the Automator program (it’s within your Applications folder).

When it opens, it’ll present you with a list of options for what kind of document you’d like to create. You could go a couple of different ways here, but I like to choose “Application”—that way, you’ll just drop your PDF onto the new program’s icon to get it to work its magic.

When the build-your-application window is revealed, find “Extract PDF Text” under the “PDFs” category…

…then drag and drop that action onto the rightmost pane.

After you do that, you’ll see the choices you have for how the files containing your PDF text will come out. You could choose to make them plain text if the formatting won’t matter, for example, or you could tell your Mac where to always save the files.

Alternatively, if you click on the “Options” text at the bottom and check “Show this action when the workflow runs,” the program will ask you every time where to save the file, what to call it, and so on.

After you’re finished setting it up precisely how you’d like to, save your application somewhere (File> Save).

I like putting mine on my Desktop for easy access, because after it’s saved, I can then just grab any PDF and drop it on my program’s icon to extract the text.

Since I picked the “Show this action when the workflow runs” option, I’ll get a dialog box with the same choices as before.

And check it out! A file, saved right where I wanted it, with the text contents of my PDF. Too cool!

One final note—if your computer isn’t the fastest or if you’re pulling the text out of a PDF with hundreds of pages, you can watch the progress via the gear icon that’ll appear up in your menu bar. 

When the gear vanishes, you’re all done. You and your PDF text can go and—hmmmm. Make beautiful music together? Ride off into the sunset? Whatever people and text files do. I dunno, man, I need more coffee.