θυμήσου με
 
roomap
2010-07-21 17:25
 
#!/bin/bash
# by Thimios Katsoulis 2011
# http://www.pure-ingredients.net
# maybe a bug if you include paths with dots

# A SCRIPT TO CREATE .TIFF FILES FROM PDFS
# SUITABLE TO   SEND WITH EFAX COMMAND LINE UTILITY IN LINUX

if [ $# -lt 1 ]
then

echo "Usage is : `basename $0` <pdf file>"
exit 1

fi
pdf=$1
filename=$(basename $pdf)
base=${pdf%.*}
psfile=$filename'.ps'

acroread -toPostScript -choosePaperByPDFPageSize $pdf $psfile
gs -dNOPAUSE -dNOPAGEPROMPT -dBATCH -sPAPERSIZE=letter -sDEVICE=tiffg3 -r204x196 -sOutputFile=$base'09d.tiff' $psfile >& /dev/null;