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 - http://kheyali.blogspot.com/2014/02/remove-pages-from-pdf.html.
Just copy the following script and paste in a text editor and save as pdfmerge.sh
-------------------------------------------------------------------------------------------------------------------
#!/bin/bash
# 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"
echo
Make the script executable by
chmod 755 pdfmerge.sh
Run
./pdfmerge.sh file.pdf file2.pdf
Just copy the following script and paste in a text editor and save as pdfmerge.sh
-------------------------------------------------------------------------------------------------------------------
#!/bin/bash
# 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"
echo
-------------------------------------------------------------------------------------------------------------------
chmod 755 pdfmerge.sh
Run
./pdfmerge.sh file.pdf file2.pdf
Comments