Changeset 32285 for main/trunk


Ignore:
Timestamp:
07/18/18 19:12:33 (2 years ago)
Author:
ak19
Message:

Fix to sectionalising xpdftools' produced paged_pretty_html: Dr Bainbridge explained that when the total num of pages < 10, we still wanted individual page headings, so GS' section-level search behaviour would work for all PDF docs processed with the sectionalised paged_pretty_html mode.

File:
1 edited

Legend:

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

    r32284 r32285  
    570570    my $inner_div_str = $new_dom->to_string;
    571571    my $page_div = "<div id=\"page".$page_num."\">\n";
    572    
    573     if($self->{'convert_to'} =~ /paged_pretty_html/) { # then add the <h>tags for sectionalising
     572
     573    # If paged_pretty_html, then add <h>tags for sectionalising
     574    if($self->{'convert_to'} =~ /paged_pretty_html/) {
    574575   
    575576    # Append a page range bucket heading if applicable: if we have more than 10 pages
     
    587588    }
    588589
    589     # No sectionalising for 10 pages or under. Otherwise, every page is a section too, not just buckets
     590    # Every page is now a section too, not just buckets.
     591    # Whether we're starting a new bucket or not, add a simpler heading: just the pagenumber, "Page #"
     592    # However, this should be <H3> when there are buckets and <H2> when there aren't any.
    590593    if($num_html_pages > 10) {
    591         # Whether we're starting a new bucket or not, add a simpler heading: just the pagenumber, "Page #" 
    592         $page_div .= "<h3 style=\"font-size:1em;font-weight:normal;\">Page ".$page_num."</h3>\n";       
     594        $page_div .= "<h3 style=\"font-size:1em;font-weight:normal;\">Page ".$page_num."</h3>\n";       
     595    } else { # PDF has less than 10 pages in total
     596        $page_div .= "<h2 style=\"font-size:1em;font-weight:normal;\">Page ".$page_num."</h2>\n";       
    593597    }
    594598    }
Note: See TracChangeset for help on using the changeset viewer.