1.安装 ghostscript
wget https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs925/ghostscript-9.25.tar.gz
tar zxvf ghostscript-9.25.tar.gz
cd ghostscript-9.25
./configure --prefix=/usr
make all
make install
2. 通过ImageMagick包可以实现PDF转图片
yum install ImageMagick
安装好之后执行以下命令即可(默认是当前文件夹下,支持绝对路径)
convert pdf_name.pdf image_name.jpg