Script to optimize PDF with PDFpen 13

Joined
Nov 3, 2024
Messages
1
Reaction score
0
Hi all,
My first post.
I have a mac mini that is always on.
I use Hazel to monitor several folders
I am using an AppleScript that monitors 1 folder and OCRs any PDF added to it. I got the script from here

I would however like to be able to a lot more, along the same lines:
Ideally the PDF would have the following actions performed:
1) Rotate and deskew
2) OCR
3) Convert to greyscale
4) Optimise

All actions are available in PDF pen but If i susbstitute OCR for Optimize in the script (for example), the script returns an error. I cannot see anywhere exactly what commands are available for PDFpen even though the website boasts a strong integration with applescript

Any pointers would be greatly appreciated

tell application "PDFpenPro"
open theFile as alias
tell document 1
ocr
repeat while performing ocr
delay 1
end repeat
delay 1
close with saving
end tell
quit
end tell
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top