Changeset 32284 for main/trunk/greenstone2/perllib/plugins/PDFv2Plugin.pm
- Timestamp:
- 2018-07-18T18:45:52+12:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/PDFv2Plugin.pm
r32283 r32284 89 89 'type' => "string", 90 90 'deft' => "Title,Author,Subject,Keywords" }, 91 91 { 'name' => "metadata_field_separator", 92 92 'desc' => "{HTMLPlugin.metadata_field_separator}", 93 93 'type' => "string", 94 94 'deft' => "" }, 95 # { 'name' => "noimages", 96 # 'desc' => "{PDFPlugin.noimages}", 97 # 'type' => "flag" }, 98 # { 'name' => "allowimagesonly", 99 # 'desc' => "{PDFPlugin.allowimagesonly}", 100 # 'type' => "flag" }, 101 # { 'name' => "complex", 102 # 'desc' => "{PDFPlugin.complex}", 103 # 'type' => "flag" }, 104 # { 'name' => "nohidden", 105 # 'desc' => "{PDFPlugin.nohidden}", 106 # 'type' => "flag" }, 107 { 'name' => "zoom", 108 'desc' => "{PDFv2Plugin.zoom}", 109 'deft' => "1", 110 'type' => "string" }, # xpdftools' zoom takes fractions 95 { 'name' => "dpi", 96 'desc' => "{PDFv2Plugin.dpi}", 97 'deft' => "96", 98 'type' => "int" }, # 72DPI is xpdf's pdftohtml's default. pdfbox' default is 96DPI in headless mode else detected from the screen resolution, see https://pdfbox.apache.org/2.0/commandline.html#pdftoimage 111 99 # { 'name' => "use_sections", 112 100 # 'desc' => "{PDFPlugin.use_sections}", … … 155 143 $self->{'convert_options'} = "-pdf_tool xpdftools"; # default for PDFv2Plugin. If pdfbox_conversion is on, the pdfbpox GS extension sets pdf_tool to pdfbox 156 144 157 # pdf_zoom is supported by xpdftools' pdftohtml. So for pretty_html and paged_pretty_html 158 my $zoom = $self->{"zoom"}; 159 $self->{'convert_options'} .= " -pdf_zoom $zoom"; 145 # Setting dpi has meaning for xpdftools pdftohtml (so paged_pretty_html and pretty_html) 146 # and for when pdfbox outputs an image for each page (pagedimg, pagedimgtxt). 147 # dpi has no effect on (paged_)text and html output modes. 148 my $dpi = $self->{"dpi"}; 149 $self->{'convert_options'} .= " -pdf_dpi $dpi"; 160 150 161 151 # PDFv2Plugin now supports PDF to txt conversion on Windows too:
Note:
See TracChangeset
for help on using the changeset viewer.