PHP ImagickException: not authorized

Your policy "MVG" could be the reason. Just comment

<policy domain="coder" rights="none" pattern="MVG" />

in /etc/ImageMagick/policy.xml and restart Apache server.


I have followed the below Steps to fix the Fatal error:

Uncaught ImagickException: not authorized `../../c02_001.pdf'
@ error/constitute.c/ReadImage/412 

  1. sudo vi policy.xml from etc/Imagemagick-6/
  2. comment the following line

    <!-- <policy domain="coder" rights="none" pattern="MVG" /> -->
    
  3. Rewrite the following line

    <policy domain="coder" rights="none" pattern="PDF" />
    

    to

    <policy domain="coder" rights="read|write" pattern="PDF" />
    
  4. sudo apt-get install inkscape

  5. Restart apache with following command sudo restart apache2