ImageMagick security policy ‘PDF’ blocking conversion
- Article
- Comment
You are here, because you stuck with this above stated issue, while processing PDF to image. This is a simple bug lets do it by simple steps.
Steps for Ubuntu/Linux
- open your
/etc/ImageMagick-7/policy.xml
, here may be the number, 5,6,7, 8, it depends with php version that you have. - goto bottom of this xml file and before theĀ
</policymap>
- add this line
<policy domain="coder" rights="read | write" pattern="PDF" />
- and than restart your apache/nginx
sudo service apache2/nginx restart
- and restart the fpm-service with this command.
sudo systemctl restart php7.2-fpm.service
That’s it., you have done the steps, now, the issue will be solved.