【发布时间】:2019-05-02 19:10:58
【问题描述】:
自从昨天早上 ghostscript 更新 9.25 -> 9.26(在 debian 上)以来,我们收到了这个错误:
ErrorMessage: FailedToExecuteCommand
`'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT
-dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2
'-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r300x300'
-dFirstPage=1 -dLastPage=1 '-sOutputFile=/tmp/magick-39903EapVvuyNQxL4%d'
'-f/tmp/magick-39903VD0GMIpLPaIN'
'-f/tmp/magick-399031owlSOb4aOEw'' (-1)
@ error/delegate.c/ExternalDelegateCommand/462
尝试阅读多页 PDF 的第一页时:
$this->resource = new \Imagick();
$this->resource->setResolution(300, 300);
$this->resource->readImage($path . '[0]');
知道如何解决这个问题吗?
见:https://www.ghostscript.com/doc/9.26/History9.htm#Version9.26 见:https://secure.php.net/manual/en/imagick.readimage.php
【问题讨论】:
-
顺便说一句。导致此更新出现问题的另一个错误是 Imagick
scaleImage重置了setImageDepth的值。因此,请务必在图像操作结束时设置深度。 -
另一个问题中的这个答案对我有用,所以这个问题可以作为重复关闭并接受该答案:stackoverflow.com/a/54550273/4447371
标签: php ghostscript imagick