No conversion in Drupal, but on commandline

Created on 16 November 2016, over 8 years ago
Updated 20 January 2025, 5 months ago

I am using PDFPreview, GraphicsMagick to get the cover of a PDF in jpg. Most PDFs have been processed, but some of theme will not.

The error I got was:
User error: ImageMagick error 1: GPL Ghostscript 8.70: Unrecoverable error, exit code 1 gm convert: Postscript delegate failed (/home/xxx/domains/xxx/public_html/sites/default/files/Openbaar/120/COVS_Statuten_2010-05-15.pdf). in _imagemagick_convert_exec() (regel 519 van /home/xxx/domains/xxx/public_html/sites/all/modules/imagemagick/imagemagick.module).

I have turned on debugging and noticed that the first command to get a jpg is not executed without giving any message.
Example of the command:
gm convert -background white -flatten -resize '300x300' -quality 100 -density 72 -units PixelsPerInch '/home/xxx/domains/xxx/public_html/sites/default/files/Openbaar/120/COVS_Statuten_2010-05-15.pdf[0]' '/home/xxx/domains/xxx/public_html/sites/default/files/pdfpreview/d07f92956e816a4cd4986580819a06c6.jpg'

But when I execute the command on the commandline, the conversion works fine. After executing this once, the complete conversion succeeds and I get a proper cover.

Why does the command fail from within Drupal?

🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇳🇱Netherlands edvanleeuwen Waalwijk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024