Index: gsdl/trunk/bin/script/gsConvert.pl
===================================================================
--- gsdl/trunk/bin/script/gsConvert.pl	(revision 17328)
+++ gsdl/trunk/bin/script/gsConvert.pl	(revision 17329)
@@ -294,5 +294,5 @@
     # Attempt coversion to Image
     if ($output_type =~ m/jp?g|gif|png/i) {
-	$success = &pdf_to_img($dirname, $input_filename, $output_filestem, $output_type);
+	$success = &pdfps_to_img($dirname, $input_filename, $output_filestem, $output_type);
 	if ($success){
 	    return "item";
@@ -330,5 +330,5 @@
     # Attempt coversion to Image
     if ($output_type =~ m/jp?g|gif|png/i) {
-	$success = &ps_to_img($dirname, $input_filename, $output_filestem, $output_type);
+	$success = &pdfps_to_img($dirname, $input_filename, $output_filestem, $output_type);
 	if ($success){
 	    return "item";
@@ -1002,5 +1002,5 @@
 # Convert a pdf file to various types of image with the convert command
 
-sub pdf_to_img {
+sub pdfps_to_img {
     my ($dirname, $input_filename, $output_filestem, $output_type) = @_;
 
@@ -1010,5 +1010,5 @@
 	if ($? == -1 || $? == 256) {  # Linux and Windows return different values for "program not found"
 	    #ImageMagick is not installed, thus the convert utility is not available. 
-	    print STDERR "*** ImageMagick is not installed, the convert utility is not available\n";
+	    print STDERR "*** ImageMagick is not installed, the convert utility is not available. Unable to convert PDF/PS to images\n";
 	    return 0;
 	}
@@ -1018,5 +1018,5 @@
     if ($timeout) {$cmd = "ulimit -t $timeout;";}
     $output_type =~ s/.*\_(.*)/$1/i;
-     $cmd .= "perl -S pdftoimg.pl -convert_to $output_type \"$input_filename\" \"$output_filestem\"";
+    $cmd .= "perl -S pdfpstoimg.pl -convert_to $output_type \"$input_filename\" \"$output_filestem\"";
     if ($ENV{'GSDLOS'} !~ m/^windows$/i || $is_winnt_2000) {
 	$cmd .= " > \"$output_filestem.out\" 2> \"$output_filestem.err\"";
@@ -1045,5 +1045,5 @@
 	if (-s "$output_filestem.err") {
 	    open (ERRLOG, "$output_filestem.err") || die "$!";
-	    print STDERR "pdftoimg error log:\n";
+	    print STDERR "pdfpstoimg error log:\n";
 	    while (<ERRLOG>) {
 		print STDERR "$_";
@@ -1306,72 +1306,4 @@
 
 
-# Convert a PS file to various types of image with the convert utility
-sub ps_to_img {
-    my ($dirname, $input_filename, $output_filestem, $output_type) = @_;
-
-    # Check that ImageMagick is installed and available on the path (except for Windows 95/98)
-    if (!($ENV{'GSDLOS'} eq "windows" && !Win32::IsWinNT())) {
-	my $result = `identify 2>&1`;
-	if ($? == -1 || $? == 256) {  # Linux and Windows return different values for "program not found"
-	    #ImageMagick is not installed, thus the convert utility is not available. 
-	    print STDERR "*** ImageMagick is not installed, the convert utility is not available\n";
-	    return 0;
-	}
-    }
-
-    $cmd = "";
-    if ($timeout) {$cmd = "ulimit -t $timeout;";}
-    $output_type =~ s/.*\_(.*)/$1/i;
-    $cmd .= "perl -S pstoimg.pl -convert_to $output_type \"$input_filename\" \"$output_filestem\"";
-    if ($ENV{'GSDLOS'} !~ m/^windows$/i || $is_winnt_2000) {
-	$cmd .= " > \"$output_filestem.out\" 2> \"$output_filestem.err\"";
-    } else {
-	$cmd .= " > \"$output_filestem.err\"";
-    }
-
-    # don't include path on windows (to avoid having to play about
-    # with quoting when GSDLHOME might contain spaces) but assume
-    # that the PATH is set up correctly
-    $!=0;
-    my $retval=system($cmd);
-    if ($retval!=0)
-    {
-	print STDERR "Error executing pstoimg.pl";
-	if ($!) {print STDERR ": $!";} 
-	print STDERR "\n";
-    }
-    
-    #make sure the converter made something
-    #if ($retval !=0) || ! -s "$output_filestem")
-    if ($retval !=0) 
-    {
-	&util::rm("$output_filestem.out") if (-e "$output_filestem.out");
-	#print out the converter's std err, if any
-	if (-s "$output_filestem.err") {
-	    open (ERRLOG, "$output_filestem.err") || die "$!";
-	    print STDERR "pstoimg error log:\n";
-	    while (<ERRLOG>) {
-		print STDERR "$_";
-	    }
-	    close ERRLOG;
-	}
-	#&util::rm("$output_filestem.html") if (-e "$output_filestem.html");
-	if (-e "$output_filestem.err") {
-	    if ($faillogfile ne "" && defined(open(FAILLOG,">>$faillogfile")))
-	    {
-		open (ERRLOG, "$output_filestem.err");
-		while (<ERRLOG>) {print FAILLOG $_;}
-		close ERRLOG;
-		close FAILLOG;
-	   }	
-	    &util::rm("$output_filestem.err");
-	}
-	return 0;
-    }
-    &util::rm("$output_filestem.err") if (-e "$output_filestem.err");
-    &util::rm("$output_filestem.out") if (-e "$output_filestem.out");
-    return 1;
-}
-
 # Convert any file to HTML with a crude perl implementation of the
 # UNIX strings command.
