Skip to content

Instantly share code, notes, and snippets.

@miloh
Last active January 21, 2016 22:51
Show Gist options
  • Save miloh/e12b350d8de4d8ea350c to your computer and use it in GitHub Desktop.
Save miloh/e12b350d8de4d8ea350c to your computer and use it in GitHub Desktop.
convert tif2pdf and unite pdf
#! /usr/bin/env bash
# quick convert of scantailor tiff output into single pdf.
# requires tiff2pdf and pdfunite
list=
for file in *.tif
do
filename=$(basename "$file")
extension=${filename##*.}
filename=${filename%.*}
echo "converting" $filename $extension "to pdf"
tiff2pdf -jz $file -o ${filename}.pdf
list="${list} ${filename}.pdf"
done
pdfunite ${list} output.pdf
echo "see output.pdf for the consolidated pdf output"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment