当我想将pdf页面转换为jpg时,此问题阻止了我
ImagickException: FailedToExecuteCommand 'gs'
如何解决此问题?
我的代码:
$im = new imagick();
$im->setResolution(300, 300);
$im->readImage($pdfPath);
您需要安装幽灵脚本,这是缺少的依赖项。此安装应该可以解决问题。
sudo apt-get update
sudo apt-get install ghostscript-x