Changeset 2028


Ignore:
Timestamp:
2001-02-20T16:00:06+13:00 (23 years ago)
Author:
jrm21
Message:

When trying to convert image formats, we pipe output to /dev/null in case
the cmd fails, and print a better error message if we can't convert using
whatever tools. (currently we try pnmtopng' and convert')

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/pdftohtml.pl

    r2023 r2028  
    142142        my $image_base = shift(@nameparts);
    143143
    144         $cmd = "pnmtopng $image > $image_base.png";
     144        $cmd = "pnmtopng $image > $image_base.png 2>/dev/null";
    145145        if (system($cmd)>0) {
    146         $cmd = "convert $image $image_base.png";
     146        $cmd = "convert $image $image_base.png 2>/dev/null";
    147147        if (system($cmd)>0) {
    148             print STDERR "Cannot convert $image into PNG format...\n";
     148            print STDERR "Cannot convert $image into PNG format (tried `pnmtopng' and `convert')...\n";
    149149            return 0; # not sure about whether to leave this one in or take it out
    150150        }
Note: See TracChangeset for help on using the changeset viewer.