ImageMagick not authorized to convert PDF to an image

前端 未结 4 1113
误落风尘
误落风尘 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:36

    I am using Dockerfile to update an image, and suddenly I got the policy.xml file in my way. although the version of Ubuntu (xenial) was the same and ImageMagick as well.

    I ended up removing the single line causing my problem.

    RUN sed -i 's/^.*policy.*coder.*none.*PDF.*//' /etc/ImageMagick-6/policy.xml

    hope this helps someone

提交回复
热议问题