Skip to main content

Posts

Showing posts from February, 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  - 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