filter-media Ignores PDFs, Only Generates Thumbnails for Images

62 views
Skip to first unread message

Lucas Silveira

unread,
Feb 6, 2025, 6:56:02 PM2/6/25
to DSpace Technical Support

Hi DSpace Community,

I'm experiencing an issue in DSpace 8 where filter-media only generates thumbnails for images (PNG, JPG, etc.) but completely ignores PDFs.

What I've Checked:

✔️ PDF MIME type is correct in the database (application/pdf).
✔️ Filters are enabled in dspace.cfg and local.cfg:

filter.plugins = PDFBox JPEG Thumbnail
filter.plugins = ImageMagick PDF Thumbnail

filter.org.dspace.app.mediafilter.PDFBoxThumbnail.inputFormats = application/pdf
filter.org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter.inputFormats = application/pdf


Running ./dspace filter-media -p list shows no PDF filters.
✔️ Executing filter-media -f -p "PDFBox JPEG Thumbnail" does nothing.
✔️ No PDF thumbnails exist in the database.
✔️ Ghostscript and ImageMagick work correctly when tested manually.

What’s Happening?

  • filter-media skips PDFs without errors, even though the filters are configured.
  • The database confirms no PDF thumbnails have been created.
  • PDF-related filters seem missing or ignored.
Questions for the Community:
  1. Is there a known issue with PDF filtering in DSpace 8?
  2. Are there additional configurations required for PDF processing?
  3. Has PDF thumbnail generation changed in DSpace 8?

Any help or insights would be greatly appreciated!

Thanks!

DSpace Technical Support

unread,
Feb 10, 2025, 12:18:25 PM2/10/25
to DSpace Technical Support
Hi Lucas,

I'm not sure if this is the issue, but you should only enable *ONE* PDF filter plugin.  So, either enable  "filter.plugins = PDFBox JPEG Thumbnail" OR enable
"filter.plugins = ImageMagick PDF Thumbnail", but not both.  

By default the "PDFBox JPEG Thumbnail" filter is enabled.  There should be no extra configuration required, and you can just run "./dspace filter-media -f" to re-filter *everything*.

If you enable the "ImageMagick PDF Thumbnail" filter, then you MUST have ImageMagick installed separately: https://wiki.lyrasis.org/display/DSDOC8x/ImageMagick+Media+Filters

I'd also recommend looking for any errors in your dspace.log file.  There *may* sometimes be PDFs which the library is unable to create thumbnails for.  Those will show up as errors though.  It's also possible that there are other errors in your logs which could be causing issues here.

I can verify that this PDF filtering is working on our demo site.  Here's an example of a test PDF which has a thumbnail image of the first page: https://demo.dspace.org/entities/publication/2574d334-41d8-481e-be5a-cf2980ee17f0

Tim

Lucas Silveira

unread,
Feb 12, 2025, 6:06:53 PM2/12/25
to DSpace Technical Support

Hi Tim,

The default setting didn't work, so I installed ImageMagick and enabled it. However, I had forgotten to set this configuration in local.cfg:

iorg.dspace.app.mediafilter.ImageMagickThumbnailFilter.ProcessStarter = /usr/bin

After adding this configuration, it worked correctly.

Thanks for your help!

Lucas

Reply all
Reply to author
Forward
0 new messages