@Pankaj S Y , there's this answer that have been successful for others.
If that doesn't help, how did you setup the extension. Do you see any errors when running composer? Does phpinfo
return the extension loaded correctly?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Below is the Imagick code reading a PDF file.
$img = new Imagick();
$img->setResolution(300,300);
$img->readImage($pdffile);
Below error appears in the log->
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')
I added policy code in /etc/ImageMagick-6/policy.xml but no effect.
@Pankaj S Y , there's this answer that have been successful for others.
If that doesn't help, how did you setup the extension. Do you see any errors when running composer? Does phpinfo
return the extension loaded correctly?