Image to pdf

#!/bin/bash
 #tiff-to-pdf is 6 to 7 times faster script than this script
 start_time=`date +%s`
 ########## Section 1 ##########
 # This command can convert any image to PDF document, version 1.3 ( very slow as compared to tiff2pdf ) but slightly faster than section 2

mogrify -format pdf *

######### Section 2 ##########
 # this command can convert any image to PDF document, version 1.3

#ls  | while read filename; do
 #file=`echo $filename |sed 's/\(.*\)\..*/\1/'`
 #convert $filename $file.pdf
 #done

finish_time=`date +%s`

echo "Time duration: `expr $finish_time - $start_time` secs."

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy This Password *

* Type Or Paste Password Here *

5,177 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>