Wednesday, February 11, 2015

Merge multiple pdf script

A simple script to merge pdfs. Nothing fancy. It just saves me the time to look up the complex command-line options needed to merge them. To edit pdfs see my previous post  -

Just copy the following script and paste in a text editor and save as
# pdfmerge v 1.0 by JOnes Feb 2015
# a simple script to simplify complex command line options

echo "Merges multiple pdfs. Usage : pdfmerge file1.pdf file2.pdf ..... [-o outputfile.pdf]. Without the -o option the defualt output filname is merged-pdf.pdf."

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged-pdf.pdf $*
echo "File written to merged-pdf.pdf"

Make the script executable by

chmod 755


./ file.pdf file2.pdf

No comments:

OK GOOGLE on Samsung Galaxy S7 doesn’t work

To make Ok Google detection work on Galaxy S7 (Galaxy series phones) we need to perform a couple of steps. 1. As long as Samsung S vo...