ImageMagick not authorized to convert PDF to an image

前端 未结 4 991
误落风尘
误落风尘 2020-11-22 06:01

I have a program, in which I need to convert a PDF to an image using Image Magick. I do that using the subprocess package:

        cmd = \'magic         


        
4条回答
  •  终归单人心
    2020-11-22 06:44

    Quick and easy solution:

    sudo mv /etc/ImageMagick-6/policy.xml /etc/ImageMagick-6/policy.xml.off
    

    When done, you can restore the original with

    sudo mv /etc/ImageMagick-6/policy.xml.off /etc/ImageMagick-6/policy.xml
    

提交回复
热议问题