gpt4 book ai didi

php - ghostscript 9.26 更新破坏了多页 PDF 的 imagick readImage

转载 作者:可可西里 更新时间:2023-11-01 00:54:21 26 4
gpt4 key购买 nike

自从昨天早上 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

最佳答案

几乎肯定是这个错误报告:

https://bugs.ghostscript.com/show_bug.cgi?id=699815

您的解决方案是;不要使用 pngalpha 设备,不要使用 FirstPage/LastPage,升级到有修复的版本,或者降级到更早的版本。虽然这个错误可能存在于许多早期版本中,但我不知道为什么它以前没有出现过。

关于php - ghostscript 9.26 更新破坏了多页 PDF 的 imagick readImage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53560755/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com