Skip to content

Instantly share code, notes, and snippets.

@nuclearsecrecy
nuclearsecrecy / pdfexpert_batch_ocr.applescript
Last active November 9, 2025 22:31
Applescript to batch run OCR on many PDF files using PDF Expert
# Applescript to batch OCR PDFs using PDF Expert.
# By Alex Wellerstein. Last updated December 16, 2024. No copyright asserted -- released for public domain use.
# Absolutely no warranties, guarantees, promises, ANYTHING provided. Use at your own risk.
#
# Will automatically save and close each PDF after OCR completes.
# Assumes PDF Expert is the default program to open PDFs!
# Does not have robust error handling. Held together with duct tape.
# Just a temporary solution until Readdle actually supports batch operations.
# Seems to work on OS 14.6.1, with PDF Expert 3.10.10.
# Has not been extensively tested to see what happens if you try to do other work while it is running; could foul up.