In an attempt to convert a PDF to an image using ImageMagick, you may encounter an authorization error, particularly: "convert-im6.q16: not authorized `temp2.pdf' @ error/constitute.c/ReadImage/412." This indicates that ImageMagick lacks the necessary permissions to access the PDF file.
To resolve this issue, the ImageMagick policy.xml file needs to be modified:
<policy domain="module" rights="read|write" pattern="{PS,PDF,XPS}" />
Note: In some systems, the "domain" may be "coder" instead of "module."
The above is the detailed content of Why Does ImageMagick Fail to Convert PDFs with an 'Authorization' Error?. For more information, please follow other related articles on the PHP Chinese website!