Created
February 1, 2017 08:20
-
-
Save kloneets/bbd35138550f70c3968daf6874d72fea to your computer and use it in GitHub Desktop.
Merge multiple pdf files in one
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/zsh | |
echo $0 | |
echo $1 | |
echo $* | |
if [[ -n "$2" ]]; then | |
echo "Merging files" | |
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=$* | |
echo "Saving $1" | |
else | |
echo "Usage: pdfmerge merged_file.pdf first.pdf second.pdf [..] last.pdf" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment