pdf2jpg
#!/usr/bin/perl my($geom,$gray,$pdf,$jpg); foreach(@ARGV) { $pdf=$1 if(/^(.*\.pdf)$/i); $jpg=$1 if(/^(.*\.jpg)$/i); $gray='-colorspace Gray' if(/^--?gray$/); $geom='-geometry $1' if(/^(\d+x\d*)$/); $geom='-geometry $1' if(/^(\d*x\d+)$/); } $jpg="$1-%02d.jpg" if(!$jpg && $pdf=~/^(.*)\.pdf$/); qx(convert -page A4 -quality 20 -interlace none -density 300 $geom $gray $pdf $jpg) if($pdf && $jpg);
(439B)
Download