Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3516

Error limiting filter-media's ImageMagick PDF Thumbnail plugin to PDF bitstreams

    Details

    • Attachments:
      0
    • Comments:
      16
    • Documentation Status:
      Not Required

      Description

      filter-media's ImageMagick PDF Thumbnail plugin erroneously processes JPGs if they are in the ORIGINAL bundle, despite configuration in dspace.cfg that should limit the plugin to Adobe PDF input formats. The expected behavior is that only PDFs should be processed.

      Item with a PDF in the ORIGINAL bundle works as expected:

      $ [dspace]/bin/dspace filter-media -f -i 10568/16881 -p "ImageMagick PDF Thumbnail" -v
      The following MediaFilters are enabled:
      Full Filter Name: org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter
      org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter
      IM Thumbnail earlywinproposal_esa_postharvest.pdf is replacable.
      File: earlywinproposal_esa_postharvest.pdf.jpg
      IM Image Param: /tmp/impdfthumb6654586450122351471.pdf[0] -flatten /tmp/impdfthumb6654586450122351471.pdf.jpg
      IM Thumbnail Param: /tmp/impdfthumb6654586450122351471.pdf.jpg -thumbnail 300x300 /tmp/impdfthumb6654586450122351471.pdf.jpg.jpg
      FILTERED: bitstream 13787 (item: 10568/16881) and created 'earlywinproposal_esa_postharvest.pdf.jpg'
      

      Item with a JPG in the ORIGINAL bundle is erroneously processed:

      $ [dspace]/bin/dspace filter-media -f -i 10568/33941  -p "ImageMagick PDF Thumbnail" -v
      The following MediaFilters are enabled:
      Full Filter Name: org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter
      org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter
      Generated Thumbnail strengtheningPig.jpg matches pattern and is replacable.
      File: strengtheningPig.jpg.jpg
      IM Image Param: /tmp/impdfthumb5315798183586620841.pdf[0] -flatten /tmp/impdfthumb5315798183586620841.pdf.jpg
      IM Thumbnail Param: /tmp/impdfthumb5315798183586620841.pdf.jpg -thumbnail 300x300 /tmp/impdfthumb5315798183586620841.pdf.jpg.jpg
      FILTERED: bitstream 23121 (item: 10568/33941) and created 'strengtheningPig.jpg.jpg'
      

      Item with a JPG in the THUMBNAIL bundle (manually uploaded after item submission) is correctly skipped with a noop:

      $ [dspace]/bin/dspace filter-media -f -i 10568/24655 -p "ImageMagick PDF Thumbnail" -v
      The following MediaFilters are enabled:
      Full Filter Name: org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter
      org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter
      

      Reported on the DSpace mailing list on 2017-02-21.

        Attachments

          Activity

            People

            • Assignee:
              terrywbrady Terry Brady
              Reporter:
              aorth Alan Orth
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: