Issues with thumbnails displaying

This is similar to the thread here: Thumbnails not auto-generating. We are having the same issue.

We have tried to repeatedly tried to compile ghostscript by source as indicated. We are still not seeing the thumbnails.
We are running:
Ubuntu 16.04.4 (yes, we are aware it is old)
Version 2.5.1 of Omeka
We realized that ghostscript was being installed under /usr/loca/bin and not /usr/bin/. We ran the command with the prefix: ./configure --prefix=/usr/bin

This created another directory under /usr/bin, so /usr/bin/bin with all of the new ghostscript compilations. We then made a backup of gs under /usr/bin and moved the gs from /usr/bin/bin to that file.

Ghostscript –v returns:

uwpadmin@omeka-ubuntu:~$ ghostscript -v
GPL Ghostscript 9.25 (2018-09-13)
Copyright © 2018 Artifex Software, Inc. All rights reserved.

Which we believe is correct. There have been also multiple reboots.

Any ideas on a possible fix? I’m willing to send logs, etc.

Please let me know.

Jay Dougherty
Head of Library Systems

You’re having the same problem, meaning “blank” thumbnails for PDFs?

Are you getting error output when trying to convert PDFs? (You can check directly on the console, something like convert "test.pdf[0]" test.jpg )

As for your issues with installing from source… the prefix doesn’t include the “bin” part; the proper prefix to install binaries under /usr/bin is just /usr . Just copying the binary’s location might not work well as other things like libraries could have been installed underneath weird paths like /usr/bin/lib given the way you set it up.

That being said, I generally wouldn’t recommend installing like that to /usr, particularly as here where you have files from your package manager already there. Simply overwriting them is likely to cause issues at some point, if not immediately. You can tell ImageMagick to use gs located in a different directory by just editing the delegates.xml file (should be located under /etc/ImageMagick or somewhere like that) and replacing references to gs with /usr/local/bin/gs (assuming you installed it there).

O.K…when I run convert on a PDF this is what I receive:

sudo convert UWPAC124_19831110.pdf UWPAC124_19831110.jpg
convert: not authorized UWPAC124_19831110.pdf' @ error/constitute.c/ReadImage/412. convert: no images definedUWPAC124_19831110.jpg’ @ error/convert.c/ConvertImageCommand/3210.

I haven’t used convert in a very long time, so I’m not sure if the syntax is correct.
I couldn’t find a path in delegates.xml. When I grep for /usr/bin/local/gs in the xml under /etc/ImageMagick-6, nothing comes up in any of the .xml files, including delegate.

That’s actually a different error you’re getting… the key part is “not authorized.”

I think you have a policy installed for ImageMagick that’s preventing it from reading PDFs. That would be defined in “policy.xml”

Thank you.

This was the issue. I had to change this line in policy.xml:

  <policy domain="coder" rights="read|write|execute" pattern="PDF" />

It works now.

Maybe this should be written in the documentation somewhere, as reading PDF is now disabled by default in Ubuntu’s imagemagick package.

  • SECURITY UPDATE: code execution vulnerabilities in ghostscript as
    invoked by imagemagick
    • debian/patches/200-disable-ghostscript-formats.patch: disable
      ghostscript handled types by default in policy.xml

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.