下面是读取pdf文件的imagick代码。
$img = new Imagick();
$img->setResolution(300,300);
$img->readImage($pdffile);
以下错误出现在日志中->
production.ERROR: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408 {"userI
d":1,"exception":"[object] (ImagickException(code: 499): attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAutho
rized/408 at /home/site/wwwroot/app/Http/Controllers/Sample.php:2812)
[stacktrace]
# 0 /home/site/wwwroot/app/Http/Controllers/Sample.php(2812): Imagick->readimage('/tmp/phpPPIrAu')
我在中添加了策略代码 /etc/ImageMagick-6/policy.xml
但没有效果。
暂无答案!
目前还没有任何答案,快来回答吧!