如何在 TYPO3 安装工具中调试 ImageMagick 图像处理?



TYPO3 9 安装工具中的图像处理无法生成 PDF 到 JPG(缩略图生成),而在控制台上运行convert工作。

我使用 ionos 托管的专用服务器并激活了 PDF 处理,如此处所述。

图像处理检查提供:

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.

不幸的是,它不显示评估的调用,也不显示返回的错误。 如何调试问题?

更新更多详细信息:

安装了 ImageMagick 6.9.10-23 和 Ghostscript 9.27。

通过在 TYPO3 代码中插入输出,我可以将其缩小到这样一个事实,即 ImageMagicksidentify命令来确定通过 PHP 执行的 PDF 大小(宽度/高度),exec返回1而不是命令输出。

命令行:

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

正确交付:PDF 595x842 595x842+0+0 16-bit ColorSeparation CMYK 1.91122MiB 0.000u 0:00.000

而通过 PHP:

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

提供不正确的1

这里有什么问题?

你安装了GhostScript吗?

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

要转换PDF,必须在您的服务器上安装GhostScript。

在 InstallTool 中的"环境">"图像处理"下,将显示执行的命令,但仅在成功测试时显示(显示失败的命令也可能是一个很大的改进)。

我可以从"阅读pdf"部分为您提供此片段,您必须在其中设置正确的路径,然后您可以自己执行并尝试找出问题所在:

'/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'

最新更新