Changeset 2241 for trunk/gsdl/bin/script/pdftohtml.pl
- Timestamp:
- 2001-04-01T21:19:25+12:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/pdftohtml.pl
r2118 r2241 177 177 print STDERR "pdftohtml.pl: $input_filename appears to have no "; 178 178 print STDERR "textual data. Aborting.\n"; 179 print STDERR "num: $unenc_stream_objects and $non_text_objects from $num_objects\n";179 # print STDERR "num: $unenc_stream_objects and $non_text_objects from $num_objects\n"; 180 180 exit(1); 181 181 } 182 182 183 183 # formulate the command 184 my $pdftohtml = &util::filename_cat($ENV{'GSDLHOME'}, "bin", 185 $ENV{'GSDLOS'}, "pdftohtml.bin"); 186 return 0 unless (-e "$pdftohtml"); 187 188 $cmd = ""; 184 my $cmd = &util::filename_cat($ENV{'GSDLHOME'}, "bin", $ENV{'GSDLOS'}, "pdftohtml.bin"); 185 186 # don't include path on windows (to avoid having to play about 187 # with quoting when GSDLHOME might contain spaces) but assume 188 # that the PATH is set up correctly - note also that on windows 189 # we use pdftohtml.exe not pdftohtml.bin 190 $cmd = "pdftohtml" if ($ENV{'GSDLOS'} !~ /^windows$/) { 191 189 192 if ($timeout) {$cmd = "ulimit -t $timeout;";} 190 $cmd .= "$pdftohtml -noframes"; 191 $cmd .= " \"$input_filename\" \"$output_filestem.html\""; 192 $cmd .= " >\"$output_filestem.out\" 2>\"$output_filestem.err\""; 193 193 $cmd .= " -noframes \"$input_filename\" \"$output_filestem.html\""; 194 $cmd .= " > \"$output_filestem.out\""; 195 196 # attempting to redirect STDERR on windows 95/98 is a bad idea 197 $cmd .= " 2> \"$output_filestem.err\"" 198 if $ENV{'GSDLOS'} !~ /^windows$/i; 199 194 200 if (system($cmd)>0) { 195 201 print STDERR "Error executing $cmd: $!\n"; … … 201 207 # Need to convert images from PPM format to PNG format 202 208 my @images; 209 203 210 204 211 open (IMAGES, "images.log"); … … 212 219 my $cmd = ""; 213 220 if ($ENV{'GSDLOS'} =~ /^windows/i) { 214 $cmd = &util::filename_cat($ENV{'GSDLHOME'}, "bin", "windows", "pnmtopng.exe"); 215 $cmd .= " $image"; 221 $cmd = "pnmtopng $image"; 216 222 if (system($cmd)!=0) { 217 223 print STDERR "Error executing $cmd\n";
Note:
See TracChangeset
for help on using the changeset viewer.