0

Image processing in the TYPO3 9 install tool fails for PDF to JPG generation (thumbnail generation), while running a convert on the console works.

I use a ionos managed dedicated server and activated PDF processing like described here.

The image processing check delivers:

Read pdf
Image generation failed
ImageMagick / GraphicsMagick handling is enabled, but the execute command returned an error. Please check your settings, especially ['GFX']['processor_path'] and ['GFX']['processor_path_lzw'] and ensure Ghostscript is installed on your server.

Unfortunately it doesn't show the evaluated call, nor the returned error. How can i debug the problem?

Update with more details:

ImageMagick 6.9.10-23 und Ghostscript 9.27 is installed.

Through insertion of outputs in the TYPO3 code i could narrow it down to the fact that ImageMagicks identify command to determine the PDFs size (width/height) executed via PHPs exec returns 1 instead of commands output.

Command line:

'/usr/bin/identify' 'pdf:/kunden/homepages/4/***/htdocs/typo3/sysext/install/Resources/Public/Images/TestInput/Test.pdf[0]'

delivers correctly: PDF 595x842 595x842+0+0 16-bit ColorSeparation CMYK 1.91122MiB 0.000u 0:00.000

Whereas via PHP:

exec("'/usr/bin/identify' 'pdf:/kunden/homepages/4/***/htdocs/typo3/sysext/install/Resources/Public/Images/TestInput/Test.pdf[0]'", $output, $returnValue);
echo $returnValue;

delivers incorrectly 1

What's the problem here?

  • You've two options: either in any php function you're using you include some code to write in a log-file or you write it in the image as image-text (which is limited or you had to make the image very large for that). – David Nov 10 '20 at 11:40
  • beside that the message you got is quite clear, so I never expect further hints by debugging. – David Nov 10 '20 at 11:42
  • you also can prevent the image from being generated by commenting out the executive part in your php-code and show a common debug instead. – David Nov 10 '20 at 11:44

1 Answers1

0

Do you have GhostScript installed?

...and ensure Ghostscript is installed on your server...

To convert PDFs, GhostScript have to be installed on your server.

In InstallTool under "Environment" > "Image Processing" the commands executed will be shown, but only on successful test (maybe it would be a great improvement to show failed commands too).

I can provide you this snippet from "Read pdf"-section, where you'll have to set your correct paths, then you can execute this by yourself and try to figure out whats wrong:

'/usr/local/bin/gm' 'convert' -interlace None -auto-orient +profile '*' -auto-orient -geometry 300x425! -colorspace RGB -quality 85  -colorspace RGB 'pdf:/html/somefolder/public/typo3/sysext/install/Resources/Public/Images/TestInput/Test.pdf[0]' '/html/somefolder/public/typo3temp/assets/images/installTool-read5faa7c988981f903163644-pdf.jpg'
Dharman
  • 30,962
  • 25
  • 85
  • 135
Naderio
  • 1,306
  • 11
  • 26