Ignore:
Timestamp:
2018-07-13T20:40:24+12:00 (6 years ago)
Author:
ak19
Message:

First of the commits to do with restructuring and refactoring the PDFPlugin. 1. Introducing PDFv1Plugin.pm, which only runs the old pdftohtml. pdfbox_conversion are moved into PDFv2Plugin. 2. In the meantime we still have PDFPlugin, the current state of the plugin, for backward compatibility: it uses both the old pdftohtml tool and still has the pdfbox_conversion option. Yet to introduced the PDFv2Plugin. 3. gsConvert.pl has the new flag pdf_tool, set/passed in by PDFPlugin.pm and all PDFPlugin classes hereafter. The pdf_tool flag can be set to pdftohtml, xpdftools or pdfbox. PDFv1Plugin will always set it to pdftohtml, to denote the old pdftohtml tool is to be used, whereas PDFv2Plugin will set it to xpdftools and PDFBoxConverter sets it for symmetry's sake to pdfbox, even though being an AutoLoadConverter at present, the PDFBoxConverter class bypasses gsConvert.pl. gsConvert.pl uses the pdf_tool flag to determine which tool is to be used to do the conversion to produce the selected output_type. 4. Added some strings. One for migrating users to indicate that PDFPlugin was being deprecated in favour of the PDFv1 and PDFv2 plugins. Another was referenced by CommonUntil, and more recently by PDFPlugin, but was not defined in strings.properties. Once PDFv2Plugin has been added, need to remove references to paged_html from PDFPlugin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/pdf-box/trunk/java/perllib/plugins/PDFBoxConverter.pm

    r32198 r32273  
    172172    return 0 if ( !-f $source_file_full_path);
    173173
     174    # Although PDFBoxConverter inherits from AutoLoadConverters and therefore
     175    # doesn't go through gsConvert.pl, still set the -pdf_tool flag in convert_options
     176    # in case in future PDFBoxConverter no longer inherits from AutoLoadConverters
     177    # and ends up going through gsConvert.pl
     178    $self->{'convert_options'} .= " -pdf_tool pdfbox";
     179   
    174180    my $img_output_mode = 0;
    175181
Note: See TracChangeset for help on using the changeset viewer.