Hint: For OCR, PDFScanner now also supports an action in the macOS Shortcuts app. This page currently only covers automation via Automator.

You can use the Automator action that is included with PDFScanner for performing batch OCR on a bunch of files or automatically have macOS perform OCR on all files in a folder.

Automator Application Icon

To do this, you need to create a workflow in the Automator application that comes with macOS. When PDFScanner is installed, a "OCR with PDFScanner" action appears in Automator automatically.

Launch screen of automator

Automator offeres different types of workflows. Select "Workflow" to create a simple workflow that is started directly from the Automator application or "Folder Action" to create a flow that is executed when a new file is added to a specified folder. On macOS Mojave, you can also create a "Quick Action" that will create a button in the finder to quickly perform the workflow.

To use PDFScanner ORC in a wokflow, just drag and drop it from the left side of the Automator window to the workflow panel on the right. If that does not work on Mojave, you first have to enable support for third party Automator Actions. Automator should open a confirmation prompt when double-clicking the PDFScanner action (dragging sometimes does not triggers this prompt).

The action will take PDF files as input and also provide PDF files as output. If you chose to save in place, the original files will be modified, otherwise the specified suffix will be appended. In general, you should chose to skip PDFs that already contain text, because there's no use in OCR'ing them (again).

A simple flow that utilizes the PDFScanner action

Automator also provides a "New PDF from images" action to convert the images to PDF first. This way, you can create PDFs with text directly from an image in one step.

Explaining all the possibilities of Automator would be far beyond the scope of this article. You can find lots of information about Automator on the official Apple Homepage and on http://macosxautomation.com/automator/

If you need access to more advanced PDFScanner actions like deskew, you can also use AppleScript to automate PDFScanner.