13.07.2018 20:40:24 (15 months ago)

First of the commits to do with restructuring and refactoring the PDFPlugin. 1. Introducing, 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. has the new flag pdf_tool, set/passed in by 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 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 Once PDFv2Plugin has been added, need to remove references to paged_html from PDFPlugin.

1 modified


  • gs2-extensions/pdf-box/trunk/java/perllib/plugins/

    r32198 r32273  
    172172    return 0 if ( !-f $source_file_full_path); 
     174    # Although PDFBoxConverter inherits from AutoLoadConverters and therefore 
     175    # doesn't go through, 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 
     178    $self->{'convert_options'} .= " -pdf_tool pdfbox"; 
    174180    my $img_output_mode = 0;