How to Listen to PDF Documents on Your iPhone or iPod

Earlier today, I needed to come up to speed quickly on IBM WebSphere MQ, a complex piece of enterprise software so I could discuss it with a senior manager at a potential consulting client. The easiest way to do this was to read an introductory whitepaper on Websphere MQ that would provide me with a very high level understanding of the software and some applications of it.


The problem was that I didn't have time to read the whitepaper because it's a 32 pages document and I needed to be at the client's office in less than two hours. I decided to take a few minutes and try to use my Mac to convert the text of the document to an audio file that I could listen to on my iPhone while driving.

I based my solution on the idea published by Ben Waldie in Automator Power: Variables and Looping that was published in the February issue of Macworld. Ben's solution has two limitations:

  1. It's Mac-only, which is not a problem for me.
  2. It's intended to handle articles from RSS and Atom feeds, and what I needed was to read the text contained in a PDF file.

My adaptation neatly extracts the text out of the PDF file and uses the same suggested MacOS services to create the audio file. Here's how I did it:

Before I began writing my Automator workflow, I needed to install PDFtoText, a shell program that converts PDF documents into plain text. Carsten Blüm built a DMG installer for this open source utility.

My Automator workflow is as follows:

  1. Internet: Get Specified URLs to retrieve
  2. Internet:Download URLs to the Downloads directory.
  3. Utilities:Run Shell Script on the following script using the "/bin/bash" shell:

    This invokes the utility to read the PDFtoText converter and extract the text from the PDF file. The text above is one continuous command statement separated by spaces. Substitute your home directory and "/Downloads" for the ellipsis in the previous two lines.
  4. Files & Folders: Open Finder Items to open the text file created above.
  5. Text: Get Contents of TextEdit Document extracts the text out of the file.
  6. Text: Text to Audio File reads the extracted text into an AIFF file. I store it that file in the Downloads directory to be consistent.
  7. Music: Import Audio Files brings the file into iTunes. I use the AAC Encoder and delete the source AIFF file after I've encoded it.
  8. Music: Add Songs to Playlist to add the new audio file to a playlist I call "Technology Reading".

This workflow worked incredibly well for me. It should work well for you too, assuming you can fast forward through things that aren't meant to be read like tables of contents, page numbers, and the text that is contained in tables and charts.

This technique is going to change the way I prepare for meetings with potential clients. Now I can listen to PDF documents on the way to an important meeting and not have to worry about trying to scan my notes while driving.