Show
Ignore:
Timestamp:
19.07.2018 19:54:32 (13 months ago)
Author:
ak19
Message:

1. Making paged_pretty_html the default rather than pretty_html, since it's likely more users will want their converted PDF sectionalised. 2. Hopefully improved the display strings to make sense for users rather than for me.

Files:
1 modified

Legend:

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

    r32287 r32290  
    7676       'reqd' => "yes", 
    7777       'list' => $convert_to_list,  
    78        'deft' => "pretty_html" },     
     78       'deft' => "paged_pretty_html" },   
    7979     { 'name' => "process_exp", 
    8080       'desc' => "{BaseImporter.process_exp}", 
     
    8686       'type' => "regexp", 
    8787       'deft' => &get_default_block_exp() }, 
    88      { 'name' => "metadata_fields", 
    89        'desc' => "{HTMLPlugin.metadata_fields}", 
    90        'type' => "string", 
    91        'deft' => "Title,Author,Subject,Keywords" }, 
    92      { 'name' => "metadata_field_separator", 
    93     'desc' => "{HTMLPlugin.metadata_field_separator}", 
    94     'type' => "string", 
    95     'deft' => "" }, 
     88#     { 'name' => "metadata_fields", 
     89#       'desc' => "{HTMLPlugin.metadata_fields}", 
     90#       'type' => "string", 
     91#       'deft' => "Title,Author,Subject,Keywords" }, 
     92#     { 'name' => "metadata_field_separator", 
     93#   'desc' => "{HTMLPlugin.metadata_field_separator}", 
     94#   'type' => "string", 
     95#   'deft' => "" }, 
    9696     { 'name' => "dpi", 
    9797       'desc' => "{PDFv2Plugin.dpi}", 
     
    106106      { 'name' => "use_realistic_book", 
    107107        'desc' => "{PDFPlugin.use_realistic_book}", 
    108     'type' => "flag"} 
     108    'type' => "flag" } 
    109109     ]; 
    110110 
     
    126126    my $pdfbox_converter_self = new PDFBoxConverter($pluginlist, $inputargs, $hashArgOptLists); 
    127127    my $cbf_self = new ConvertBinaryFile($pluginlist, $inputargs, $hashArgOptLists); 
    128     my $self = BaseImporter::merge_inheritance($pdfbox_converter_self, $cbf_self); 
     128    my $self = BaseImporter::merge_inheritance($pdfbox_converter_self, $cbf_self); # this param order seems necessary to preserve the default/user-selected value for the convert_to option 
    129129     
    130130    if ($self->{'info_only'}) { 
     
    151151 
    152152    if ($self->{'convert_to'} eq "auto") { 
    153     # choose pretty_html is the best default option when using xpdftools 
    154     $self->{'convert_to'} = "pretty_html"; 
     153    # defaulting to paged_pretty_html, as it's the best default option when using xpdftools 
     154    $self->{'convert_to'} = "paged_pretty_html"; 
     155    &gsprintf::gsprintf(STDERR, "PDFv2Plugin: {PDFv2Plugin.auto_output_default}\n", $self->{'convert_to'}); 
    155156    } 
    156157    if ($self->{'use_realistic_book'}) { 
    157158    if ($self->{'convert_to'} ne "html") { 
    158         print STDERR "PDFs will be converted to HTML for realistic book functionality\n"; 
     159        &gsprintf::gsprintf(STDERR, "PDFv2Plugin: {PDFPlugin.html_for_realistic_book}\n"); 
    159160        $self->{'convert_to'} = "html"; 
    160161    } 
     
    424425    # Copying file open/close code from CommonUtil::utf8_write_file() 
    425426    if (!open (OUTFILE, ">:utf8", $output_filename)) { 
    426     gsprintf(STDERR, "PDFv2Plugin::xpdftohtml_convert_post_process {CommonUtil.could_not_open_for_writing} ($!)\n", $output_filename); 
     427    &gsprintf::gsprintf(STDERR, "PDFv2Plugin::xpdftohtml_convert_post_process {CommonUtil.could_not_open_for_writing} ($!)\n", $output_filename); 
    427428    die "\n"; 
    428429    }