Skip to content

Instantly share code, notes, and snippets.

@mchapman87501
Created April 11, 2020 16:47
Show Gist options
  • Save mchapman87501/f29bdf522b1617359909bec251aa9596 to your computer and use it in GitHub Desktop.
Save mchapman87501/f29bdf522b1617359909bec251aa9596 to your computer and use it in GitHub Desktop.
Add an item to macOS "Print > PDF" popup menu, to save as PDF and open w. PDF Expert
#!/bin/zsh
# Open Automator
# File -> New
# Select "Print Plugin"
# In the resulting document:
# Drag Run Shell Script to the right-hand pane
# Set shell to /bin/zsh
# Paste in this script
filename=$(basename "$1")
destpath=${HOME}/Documents/eBooks/Freebies/${filename}
cp "$1" "${destpath}"
open -a "PDF Expert" "${destpath}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment