Thumbnails are not created when uploading a pdf

Hello everyone! I am using Omeka Classic 3.1.2 and PHP 8.2.17 (fpm-fcgi). My Omeka instance is installed in a shared-hosting server. I have recently updated to this latest version of Omeka because of some upgrades to the servers of my hosting provider. I am not allowed to use Imagemagick and the convert command in the shared-hosting, so I tried using one of the other alternatives for creating thumbnails. As mentioned in this page Configuring Thumbnail Creation - Omeka Classic User Manual I have tried both Omeka_File_Derivative_Strategy_GD and Omeka_File_Derivative_Strategy_Imagick.

When I upload an image (jpg, png) the thumbnail is created successfully (for both GD and Imagick), but when I upload a pdf nothing is created. I don’t get any error after clicking on the save button and the pdf is always saved successfully. I have also checked the “omeka_files” table in the database and I have found the record for the pdf I uploaded. However, the field has_derivative_image for the pdf record is 0.

I have tried to find a solution here inside the forum but nothing helped me. I am aware of Derivative Images plugin but I tried to install it on development environment and I got a compatibility error, so I have never installed on the production server.
Could anyone give me some advice about this issue with the pdf’s thumbnails?

Do you have Ghostscript installed on your server? I guess it is necessary for pdf thumbnails creating.

I don’t know if ghostscript is installed on the server. In this forum, I have read in other posts regarding similar issues, that ghostscript is mentioned as the solution to such problems. However, ghostscript is not one of the requirements for installing omeka classic (on the other hand, imagemagick is a requirement System Requirements - Omeka Classic User Manual). Are you sure it is required for image creation?
I will ask the hosting provider, whether ghostsscript is installed or not, but even if it is installed, I will not have access to this. As I wrote before, I use a shared-hosting plan and I have not access to command line. That’s why I don’t use the default strategy which uses Imagemagick. I searched the documentation Using Ghostscript — Ghostscript 10.04.0 documentation and found out that ghostscipt is invoked with a command line.

The GD strategy never supports PDFs, only basic “normal” images.

Ghostscript is what’s used by ImageMagick for making thumbnails of PDFs. Your server can also just disable ImageMagick’s ability to open PDFs, regardless of whether Ghostscript is installed. If your host doesn’t support it then there’s nothing Omeka can do.

Thank you for your answer! So, I will have to use this class Omeka_File_Derivative_Strategy_Imagick and make sure that ghostscript is installed in the server. I am still waiting an answer from the administrator about ghostscript. I will let you know when he responds back to me.
(I have also checked the phpinfo page, and found the table with the details about the imagick module. In this table I can find the PDF among the other 250 ImageMagick supported formats.)

By default on debian and some derivatives, imagemagick disallows the conversion of pdf for old security reasons. You may have to check the file /etc/ImageMagick-6/policy.xml on your server and comment line <policy domain="coder" rights="none" pattern="PDF" />.