diff options
author | Aaron LI <aly@aaronly.me> | 2017-11-03 18:31:48 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-11-03 18:31:48 +0800 |
commit | 534e4fdf0a705c66660e3e1b707edd7ab1bf922c (patch) | |
tree | fcb28c38a02198e7e6aece592e08a0b5a0c01200 /cli/mergepdf.sh | |
parent | bc87a53a283d7dec8c52cccf4689fb2d9765a277 (diff) | |
download | atoolbox-534e4fdf0a705c66660e3e1b707edd7ab1bf922c.tar.bz2 |
Rename pdfmerge.sh to mergepdf.sh
Diffstat (limited to 'cli/mergepdf.sh')
-rwxr-xr-x | cli/mergepdf.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/cli/mergepdf.sh b/cli/mergepdf.sh new file mode 100755 index 0000000..aef72db --- /dev/null +++ b/cli/mergepdf.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}" + |