Use Automator workflows with PDFpen

[Now that PDFpen 6.2.1 includes an Open Scripts Folder menu item, we’ve simplified the instructions below. We improved PDFpen in repsonse to writing this blog post, and we hope you like the change. Please update to 6.2.1 before proceeding.]

PDFpen 6.2 adds support for running Automator workflows from the script menu.

If you’re not familiar with Automator, I’d recommend this blog post from David Sparks. It’s a great example and can help you decide whether or not you’d like to learn more. Automator workflows are quite visual and more accessible to folks without a programming background than AppleScript. This post isn’t meant to be a tutorial on Automator workflows. It’s meant to give you an example of what you can do with one of PDFpen’s newest features.

Automator already includes a number of actions which can be applied to PDFs and an even greater number of actions which can be applied to files, and your PDFs are also files. Let’s dive in and create an action to apply a grid to a PDF and open it as a new document.

  1. Launch Automator, found in your Applications folder
  2. Choose File -> New
  3. Click Workflow and press Choose. Your PDF will serve as the input to your Automator workflow
  4. In the Actions tab under Library select PDFs
  5. Drag Add Grid to PDF Documents to the blank area to the right labeled Drag actions…
  6. Under Library, select Files & Folders
  7. Drag Open Finder Items to the actions panel
  8. If PDFpen is not your default PDF viewer, choose it from the Open with: popup
  9. Choose File -> Save…, name your workflow Add Grid and save it to the Desktop

Now, we need to move the script to the appropriate location.

  1. Choose Open Scripts Folder from the scripts menu of PDFpen
  2. Move your script from the Desktop to the folder opened in step #1
  3. Quit and re-launch PDFpen
  4. Open a PDF to which you’d like to add a grid
  5. Choose Add Grid from the script menu
  6. Now, you have a new PDF with a grid

Hopefully, this gives you a flavor of the power of Automator workflows and inspires you to investigate how you might use them in concert with PDFpen to make your work easier.

If you have a great Automator workflow you’d like to share, please let us know.