1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/usr/bin/perl -w my $pdfdir= "/mnt/sun/export/seiten-jpgs"; my $outdir= "/home/kamp"; use File::Path; use File::Copy; chdir ("$pdfdir"); foreach $file (glob("*.pdf")) { ($name = $file) =~ s/^(.*)\.pdf/$1/; "/usr/bin/gs -q -dNOPAUSE -r144 -dBATCH -sDEVICE=jpeg -sOutputFile=$outdir/$name.jpg $pdfdir/$name.pdf"; }