0

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

我使用 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

这里有什么问题?

4

1 回答 1

0

你有安装 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'
于 2020-11-10T11:46:02.430 回答