how to convert Pdf to image via imagemagick command?
I am using following environment:
Ubunut : 11.0 (virtual machine) Imagemagick : ImageMagick-6.9.3-7
I have execut following command:
wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar xzvf ImageMagick.tar.gz
ls
cd ImageMagick<version number here>/
./configure
make clean
make
sudo make install
ldconfig /usr/local/lib
After executing below command:
make check
40 test case 39 pass only 1 is fail (FAIL: tests/wandtest.tap 1)
Now i want to convert pdf file to jpg via command:
convert test.pdf test.jpg
convert: no decode delegate for this image format PNG' @ error/constitute.c/ReadImage/501. convert: no images defined
PNG' @ error/constitute.c/ReadImage/501. convert: no images defined
test.jpg' @ error/convert.c/ConvertImageCommand/3252
convert test.pdf test.png
convert: no decode delegate for this image format PNG' @ error/constitute.c/ReadImage/501. convert: no images defined
PNG' @ error/constitute.c/ReadImage/501. convert: no images defined
test.png' @ error/convert.c/ConvertImageCommand/3252.
anyone can suggest me how can i do ?
ImageMagick uses assorted external libraries to do its dirty work as far as input and output handling goes for various formats. In your case:
For reading PDFs, you need to have Ghostscript installed. Also it needs to be in your path as gs
in order to work, so don't use that for some other shell alias. For more details see: https://superuser.com/q/819277/33767
For writing PNGs you'll need libpng
.
Once those things are on your system (and in the case you compiled IM yourself, on your system at the time of compile) you should be golden.
Same problem. Solved it with:
apt-get -y install ghostscript
链接地址: http://www.djcxy.com/p/90920.html