summaryrefslogtreecommitdiff
path: root/support/m-tx/doc/pdfcat
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/m-tx/doc/pdfcat
Initial commit
Diffstat (limited to 'support/m-tx/doc/pdfcat')
-rwxr-xr-xsupport/m-tx/doc/pdfcat32
1 files changed, 32 insertions, 0 deletions
diff --git a/support/m-tx/doc/pdfcat b/support/m-tx/doc/pdfcat
new file mode 100755
index 0000000000..fd773f7690
--- /dev/null
+++ b/support/m-tx/doc/pdfcat
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# pdfcat.sh
+# Thanks to Christian Mondrup for this script
+
+FILENAME=`basename $0`
+
+USAGE="Usage: $FILENAME [-a (A4 paper)] -o outputfile -i \"inputfile1 inputfile12 ...\""
+
+if [ $# -le 3 ]
+then
+ echo $USAGE
+ exit 2
+fi
+
+GSARGS="-q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite"
+
+while getopts "i:o:a" ARG_STRING
+do
+ case $ARG_STRING in
+ a) GSARGS="-sPAPERSIZE=a4 $GSARGS"
+ ;;
+ i) INPUTFILES=$OPTARG
+ ;;
+ o) OUTPUTNAME=$OPTARG
+ ;;
+ *) echo $USAGE
+ exit 2;;
+ esac
+done
+
+gs $GSARGS -sOutputFile=$OUTPUTNAME $INPUTFILES