Changeset 32290 for main/trunk/greenstone2/perllib/plugins
- Timestamp:
- 2018-07-19T19:54:32+12:00 (6 years ago)
- Location:
- main/trunk/greenstone2/perllib/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/PDFPlugin.pm
r32289 r32290 165 165 if ($self->{'use_realistic_book'}) { 166 166 if ($self->{'convert_to'} ne "html") { 167 print STDERR "PDFs will be converted to HTML for realistic book functionality\n";167 &gsprintf::gsprintf(STDERR, "PDFv2Plugin: {PDFPlugin.html_for_realistic_book}\n"); 168 168 $self->{'convert_to'} = "html"; 169 169 } -
main/trunk/greenstone2/perllib/plugins/PDFv2Plugin.pm
r32287 r32290 76 76 'reqd' => "yes", 77 77 'list' => $convert_to_list, 78 'deft' => "p retty_html" },78 'deft' => "paged_pretty_html" }, 79 79 { 'name' => "process_exp", 80 80 'desc' => "{BaseImporter.process_exp}", … … 86 86 'type' => "regexp", 87 87 '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' => "" }, 96 96 { 'name' => "dpi", 97 97 'desc' => "{PDFv2Plugin.dpi}", … … 106 106 { 'name' => "use_realistic_book", 107 107 'desc' => "{PDFPlugin.use_realistic_book}", 108 'type' => "flag" }108 'type' => "flag" } 109 109 ]; 110 110 … … 126 126 my $pdfbox_converter_self = new PDFBoxConverter($pluginlist, $inputargs, $hashArgOptLists); 127 127 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 129 129 130 130 if ($self->{'info_only'}) { … … 151 151 152 152 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'}); 155 156 } 156 157 if ($self->{'use_realistic_book'}) { 157 158 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"); 159 160 $self->{'convert_to'} = "html"; 160 161 } … … 424 425 # Copying file open/close code from CommonUtil::utf8_write_file() 425 426 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); 427 428 die "\n"; 428 429 }
Note:
See TracChangeset
for help on using the changeset viewer.