How to automate extracting pages from a PDF using AppleScript and Acrobat Pro?

Chris picture Chris · Sep 4, 2013 · Viewed 9.7k times · Source

I'm new to AppleScript, but I am trying to create a script that will go through all PDFs in a folder extracting the pages into separate files. My plan is to use a combination of Automator and AppleScript.

My AppleScript so far is:

tell application "Adobe Acrobat Pro"
    open theFile
    set numPages to (count active doc each page)
    --execute the extraction here
end tell

The command in Acrobat Pro is under Options > Extract Pages..., where I can specify the page range and to extract to separate files. However, I can't seem to find a way to do this with the Acrobat Pro Dictionary in AppleScript.

There is an execute command that executes a menu item, but I can't seem to get it working (I'm also not sure of the syntax to use; i.e. execute "Options:Extract Pages..."?). Any help on this?

Answer

Digital Trauma picture Digital Trauma · Sep 4, 2013

I think you can do this entirely with the Automator without the need for AppleScript or Adobe software. The "PDF to Images" action splits a multi-page .PDF file into individual .PDF files, one per page:

enter image description here