根据这个问题, 我怎样能在Linux命令行上将一系列图片转换成PDF文件?, ImageMagick可以将多张图片转换为一个PDF文件。
如何才能反过来操作,将一个多页的PDF文件转换为多张图片呢?
我尝试了下面的命令,但是出现了错误:
如何才能反过来操作,将一个多页的PDF文件转换为多张图片呢?
我尝试了下面的命令,但是出现了错误:
$ convert test.pdf test-%02.png
convert-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408.
convert-im6.q16: no images defined `test-%02.png' @ error/convert.c/ConvertImageCommand/3258.
gs
已安装:
$ gs --version
9.26
Ubuntu版本:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.04
Release: 19.04
Codename: disco
/etc/ImageMagick-7/policy.xml
进行一些明智的编辑应该能解决问题:在</policymap>
之前添加<policy domain="coder" rights="read | write" pattern="PDF" />
。 - andrew.46convert-im6.q16: not authorized filename.pdf @ error/constitute.c/WriteImage/1037.
- M.Viking