Ignore:
Timestamp:
2023-07-04T18:07:50+12:00 (10 months ago)
Author:
anupama
Message:

Dr Bainbridge's bugfix for something broken with PDFv2Plugin outputting pagedimgs. Beware: the filename readjustment undoes his changeset/32748. The commit message of that changeset isn't clear what bug exactly it fixed and how it fixed it (the details of why the fix was necessary). So until we remember what 32748 fixed and why it was necessary, this commit may be trading one fix in for another.

File:
1 edited

Legend:

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

    r32748 r37801  
    220220    # append the output filetype suffix only for non-image output formats, since for
    221221    # images we can be outputting multiple image files per single PDF input file
    222     #my $target_file = ($img_output_mode || $paged_txt_output_mode) ? "$file_root" : "$file_root.$target_file_type";
    223     my $target_file = ($img_output_mode || $paged_txt_output_mode) ? "" : "$file_root.$target_file_type";
    224    
    225 
     222    #my $target_file = ($img_output_mode || $paged_txt_output_mode) ? "" : "$file_root.$target_file_type";
     223    my $target_file = ($img_output_mode || $paged_txt_output_mode) ? "$file_root" : "$file_root.$target_file_type";
     224   
    226225    $target_file_path = &FileUtils::filenameConcatenate($cache_dir,$target_file);
     226   
     227    if($img_output_mode || $paged_txt_output_mode) {
     228        if(!&FileUtils::directoryExists($target_file_path)) {
     229        mkdir($target_file_path);
     230        }
     231    }
     232       
     233    # In this branch of the if-statement, we *don't* want this stored as part of 'pbtmp_file_path' 
    227234    }
    228235    else {
Note: See TracChangeset for help on using the changeset viewer.