Article

  • 2 years

    16 days

    YetiShare / Plugins / Document Viewer

    2930

Uncaught ImagickException: attempt to perform an operation not allowed by the security policy `PDF'

Issue:


When attempting to view a PDF thumbnail, it fails with the error below in the logs:

Uncaught ImagickException: attempt to perform an operation not allowed by the security policy `PDF'

Logs:

  • /var/log/imagick.log
  • /var/log/imagemagick/policy.log

Fix:


Edit:

nano /etc/ImageMagick-6/policy.xml

Find:

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

Remove or comment out that line:

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

Restart PHP FPM & Nginx/Apache.