Last active
January 21, 2016 22:51
-
-
Save miloh/e12b350d8de4d8ea350c to your computer and use it in GitHub Desktop.
convert tif2pdf and unite pdf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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