Changeset 2117


Ignore:
Timestamp:
2001-03-05T18:00:10+13:00 (23 years ago)
Author:
jrm21
Message:

Tidied up a bit, error in args passed to pdf_to_text, etc.

File:
1 edited

Legend:

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

    r2060 r2117  
    246246    # Attempt conversion to TEXT
    247247    if (!$output_type || ($output_type =~ /text/i)) {
    248     $success = &pdf_to_text($input_filename, $output_filestem);
     248    $success = &pdf_to_text($dirname, $input_filename, $output_filestem);
    249249    if ($success) {
    250250        return "text";
     
    420420    $cmd .= "pdftohtml.pl -F ";
    421421    $cmd .= " \"$input_filename\" \"$output_filestem\"";
    422 
     422    $!=0;
    423423    if (system($cmd)!=0)
    424424    {
    425     print STDERR "Error executing $cmd: $!\n";
     425    print STDERR "Error executing $cmd";
     426    if ($!) {print STDERR ": $!";}
     427    print STDERR "\n";
    426428    return 0;
    427429    }
     
    452454    ($dirname, $input_filename, $output_filestem) = @_;
    453455
    454     $cmd = "pdftotext \"$input_filename\" > \"$output_filestem.text\"";
    455     $cmd .= " 2> $output_filestem.err";
     456    my $cmd = "pdftotext \"$input_filename\" > \"$output_filestem.text\"";
     457    $cmd .= " 2> \"$output_filestem.err\"";
    456458   
    457459    if (system($cmd)!=0)
Note: See TracChangeset for help on using the changeset viewer.