Skip to content

Instantly share code, notes, and snippets.

@anthonywu
Created April 18, 2013 02:35
Show Gist options
  • Save anthonywu/5409586 to your computer and use it in GitHub Desktop.
Save anthonywu/5409586 to your computer and use it in GitHub Desktop.
Mac OS X – bash function to join pdfs on the command line
function pdf_join {
join_py="/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py"
read -p "Name of output file > " output_file && "$join_py" -o $output_file $@ && open $output_file
}
@ldong
Copy link

ldong commented Feb 2, 2015

Zsh version

function pdf_join {
  join_py="/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py"
  read "output_file?Name of output file > "
  "$join_py" -o $output_file $@ && open $output_file
}

Usage: pdf_join merged.pdf 1.pdf 2.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment