diff options
author | Aaron LI <aaronly.me@gmail.com> | 2016-03-31 10:57:34 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@gmail.com> | 2016-03-31 10:57:34 +0800 |
commit | c9c896dea2ba43551c4e10bd49666105449e9bd7 (patch) | |
tree | e94b73f17b2d776c2acd4c9549657f500c3dc7ce /cli/pdfmerge.sh | |
parent | 2b6cb9b655a53d43b32a8a211287c82f4f59999a (diff) | |
download | atoolbox-c9c896dea2ba43551c4e10bd49666105449e9bd7.tar.bz2 |
add all scripts/tools
Diffstat (limited to 'cli/pdfmerge.sh')
-rwxr-xr-x | cli/pdfmerge.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/cli/pdfmerge.sh b/cli/pdfmerge.sh new file mode 100755 index 0000000..aef72db --- /dev/null +++ b/cli/pdfmerge.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# +# Merge multiple PDFs with pdftk. +# +# Ref: +# Merging Multiple PDFs under GNU/Linux +# https://blog.dbrgn.ch/2013/8/14/merge-multiple-pdfs/ +# +# Weitian LI +# 2015/01/23 +# + +if [ $# -lt 2 ]; then + printf "Usage: `basename $0` out.pdf in1.pdf ...\n" + exit 1 +fi + +outpdf="$1" +shift + +echo "Input files: $@" +pdftk "$@" cat output "${outpdf}" + |