Changeset 32090 for gs2-extensions

Show
Ignore:
Timestamp:
08.12.2017 20:16:36 (20 months ago)
Author:
ak19
Message:

Related to the previous commit, revision 32089. Some improvements.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/pdf-box/trunk/java/perllib/plugins/PDFBoxConverter.pm

    r32089 r32090  
    266266 
    267267    my $fulltext = &FileUtils::readUTF8File($target_file_path); 
    268     #$fulltext = &HTML::Entities::encode($fulltext); # doesn't seem to help 
    269     $fulltext =~ s@&@&@sg; # Kathy's fix to ensure doc contents don't break XML 
    270     &FileUtils::writeUTF8File($target_file_path, \$fulltext); 
     268    if(defined $fulltext) { 
     269        #$fulltext = &HTML::Entities::encode($fulltext); # doesn't seem to help 
     270        $fulltext =~ s@&@&@sg; # Kathy's fix to ensure doc contents don't break XML 
     271        &FileUtils::writeUTF8File($target_file_path, \$fulltext); 
     272    } else { 
     273        print STDERR "PDFBoxConverter::convert(): Unable to read from converted file\n"; 
     274        $had_error = 1; 
     275    } 
    271276    } 
    272277