Ignore:
Timestamp:
2018-07-18T18:45:52+12:00 (6 years ago)
Author:
ak19
Message:

PDFv2Plugin doesn't offer a zoom flag anymore, replaced with a dpi flag to set the resolution.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/gsConvert.pl

    r32277 r32284  
    6565my $pdf_nohidden;
    6666my $pdf_zoom;
     67my $pdf_dpi;
    6768my $pdf_ignore_images;
    6869my $pdf_allow_images_only;
     
    9091    print STDERR "\t-pdf_zoom\tfactor by which to zoom PDF (only useful if\n";
    9192    print STDERR "\t\t-pdf_complex is set\n";
     93    print STDERR "\t-pdf_dpi\tSet the resolution in DPI of background images produced by xpdf's pdftohtml\n";
    9294    exit(1);
    9395}
     
    132134             'pdf_allow_images_only', \$pdf_allow_images_only,
    133135             'pdf_nohidden', \$pdf_nohidden,
    134              'pdf_zoom/\d+/2', \$pdf_zoom
     136             'pdf_zoom/\d+/2', \$pdf_zoom,
     137             'pdf_dpi/\d+/96', \$pdf_dpi
    135138             ))
    136139    {
     
    899902    # xpdf's pdftohtml tool also takes a zoom factor, where a zoom of 1 is 100%
    900903    $cmd .= "\"$xpdf_pdftohtml\"";
    901     $cmd .= " -z $pdf_zoom" if ($pdf_zoom);
    902 #    $cmd .= " -c" if ($pdf_complex);
    903 #    $cmd .= " -i" if ($pdf_ignore_images);
    904 #    $cmd .= " -a" if ($pdf_allow_images_only);
    905 #    $cmd .= " -hidden" unless ($pdf_nohidden);   
     904    # resolution, -r in DPI of background images, see https://www.xpdfreader.com/pdftohtml-man.html
     905    $cmd .= " -r $pdf_dpi" if ($pdf_dpi);
    906906    $cmd .= " \"$input_filename\" \"$tmp_dirname\"";
    907907    #$cmd .= " \"$input_filename\" \"$output_filestem\"";
Note: See TracChangeset for help on using the changeset viewer.