wand.exceptions.PolicyError: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408 code example
Example: imagemagick pdf permission
Add the line below before </policymap> in the /etc/ImageMagick-7/policy.xml
<policy domain="coder" rights="read | write" pattern="PDF" />