Skip to content

Instantly share code, notes, and snippets.

@macdrifter
Created March 2, 2010 03:20
Show Gist options
  • Save macdrifter/319089 to your computer and use it in GitHub Desktop.
Save macdrifter/319089 to your computer and use it in GitHub Desktop.
AppleScript that calls the python code buried in an automator action. This is example code for use with Devonthink Office Pro. The script should combine to PDF's into one new original
(* AppleScript that calls the python code buried in an automator action. This is example code for use with Devonthink Office Pro. The script should combine to PDF's into one new original *)
try
set myScript to "/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" -- Path to the python script
set sourceOne to "/Path/To/First/PDF/myFile.PDF" -- First PDF
set sourceTwo to "/Path/To/Second/PDF/myFile.PDF" -- Second PDF
set myDestination to "~/final.pdf" -- The new file
do shell script "python " & quoted form of myScript & " " & " -o " & quoted form of myDestination & " " & quoted form of sourceOne & " " & quoted form of sourceTwo
end try
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment