Changeset 10401
- Timestamp:
- 2005-08-03T12:36:02+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/gsConvert.pl
r10357 r10401 215 215 if (!$output_type || ($output_type =~ /html/i)){ 216 216 if ($windows_scripting) { 217 print STDERR "***** Calling VB Script!\n";218 217 $success = &native_doc_to_html($input_filename, $output_filestem); 219 218 } 220 219 else { 221 print STDERR "**** Calling wvWare\n";222 220 $success = &doc_to_html($input_filename, $output_filestem); 223 221 } … … 820 818 sub pdf_to_img { 821 819 my ($dirname, $input_filename, $output_filestem, $output_type) = @_; 822 820 821 # Check that ImageMagick is installed and available on the path (except for Windows 95/98) 822 if (!($ENV{'GSDLOS'} eq "windows" && !Win32::IsWinNT())) { 823 my $result = `identify 2>&1`; 824 if ($? == -1 || $? == 256) { # Linux and Windows return different values for "program not found" 825 #ImageMagick is not installed, thus the convert utility is not available. 826 print STDERR "*** ImageMagick is not installed, the convert utility is not available\n"; 827 return 0; 828 } 829 } 830 823 831 $cmd = ""; 824 832 if ($timeout) {$cmd = "ulimit -t $timeout;";} … … 831 839 } 832 840 833 #print STDERR "*** gsConvert pdf_to_img Command =$cmd\n";834 835 841 # don't include path on windows (to avoid having to play about 836 842 # with quoting when GSDLHOME might contain spaces) but assume 837 843 # that the PATH is set up correctly 838 839 844 $!=0; 840 845 my $retval=system($cmd); 841 846 if ($retval!=0) 842 847 { 843 print STDERR "Error executing pdfto html.pl";848 print STDERR "Error executing pdftoimg.pl"; 844 849 if ($!) {print STDERR ": $!";} 845 850 print STDERR "\n"; … … 847 852 848 853 #make sure the converter made something 849 #if ($retval!=0 || ! -s "$output_filestem.html")850 854 #if ($retval !=0) || ! -s "$output_filestem") 851 855 if ($retval !=0) … … 855 859 if (-s "$output_filestem.err") { 856 860 open (ERRLOG, "$output_filestem.err") || die "$!"; 857 print STDERR "pdfto htmlerror log:\n";861 print STDERR "pdftoimg error log:\n"; 858 862 while (<ERRLOG>) { 859 863 print STDERR "$_";
Note:
See TracChangeset
for help on using the changeset viewer.