安装

1
sudo apt install imagemagick

报错

pdf security 报错

  • 引用

  • 方法

    Well, I added

    <policy domain="coder" rights="read | write" pattern="PDF" />

    just before </policymap> in /etc/ImageMagick-7/policy.xml and that makes it work again, but not sure about the security implications of that.

截图

  • -crop

    1
    
      convert  -density 200 ./one.pdf -quality 100 -colorspace gray -crop 500x500+500+500 "./one_300.jpg"