Ignore:
Timestamp:
2018-06-22T22:04:16+12:00 (6 years ago)
Author:
ak19
Message:
  1. ConvertBinaryFile.pm no longer knows more than necessary about PDFPlugin's new paged_html output mode; 2. PDFPlugin.pm produces a more correct final html in paged_html output mode: the headings for the current page and page buckets of size 10 (e.g. Pages 21-30) no longer appear behind the generated screenshot of each page on preview. It wasn't a z-index problem, or rather, it was better solved by having an outer div and letting the normal DOM doc flow take care of the rest.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/ConvertBinaryFile.pm

    r32205 r32206  
    349349        $output_filename = $tmp_dirname . "\/$utf8_tailname\/" . $utf8_tailname . ".$output_type";
    350350    }
    351     } elsif ($output_type eq "paged_html") {
    352     $output_filename =~ s/$lc_suffix$/.html/;
    353351    } else {
    354352    $output_filename =~ s/$lc_suffix$/.$output_type/;
     
    374372    if ("$conv_filename" eq "") {return -1;} # had an error, will be passed down pipeline
    375373
    376     # We used to return -1 here if $conv_filename didn't exist at this stage
    377     # However, for "paged_html" convert_to mode, the converted HTML file $conv_filename
    378     # will only be created from conversion products *after* convert_post_process() returns
    379374    my $output_type=$self->{'convert_to'};
    380     if ($output_type ne "paged_html" && ! -e "$conv_filename") {return -1;} 
     375    if (!&FileUtils::fileExists($conv_filename)) {return -1;}
    381376    $self->{'conv_filename'} = $conv_filename;
    382377    $self->convert_post_process($conv_filename);
    383     if ($output_type eq "paged_html" && ! -e "$conv_filename") {return -1;} 
     378
     379    # Check if, after post-processing, the final expected output file has changed
     380    # And if it has, check that the final output file now exists after post processing
     381    if(defined $self->{'conv_filename_after_post_process'}) {   
     382    $conv_filename = $self->{'conv_filename_after_post_process'};
     383    if (!&FileUtils::fileExists($conv_filename)) {return -1;}
     384    }
    384385
    385386    # Run the "fribidi" (http://fribidi.org) Unicode Bidirectional Algorithm program over the converted file
Note: See TracChangeset for help on using the changeset viewer.