0

I have tried convert pdf file to jpg using imagemagick.
There is enough examples, but none of them work.
Example pdf i used is: http://www.pdf995.com/samples/pdf.pdf
command: convert -colorspace cmyk /root/pdf.pdf r.png

I have tried tons of different variations but in result generated file is pdf (only extension is png or jpg) Tried uninstall and install imagemagick, no result;

Version: ImageMagick 7.0.8-22 Q16 x86_64 2018-12-31 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP
Delegates (built-in)

GPL Ghostscript 9.26 (2018-11-20)

Ubuntu 16.04
  • 1
    The fact that it shows no delegates is probably an issue. On my box that line is `Delegates (built-in): autotrace bzlib cairo fftw fontconfig ...`. How did you install ImageMagick? – cody Jan 02 '19 at 16:48
  • sudo apt install imagemagick – Bahram Hasanov Jan 02 '19 at 16:51
  • The following askubuntu thread looks relevant. Now that I mention it, that is probably where you should have asked this question. https://askubuntu.com/questions/745660/imagemagick-png-delegate-install-problems – cody Jan 02 '19 at 16:53
  • tried answer from here and worked https://www.imagemagick.org/discourse-server/viewtopic.php?t=17117 – Bahram Hasanov Jan 02 '19 at 17:43
  • You are installing from source and there are no delegates for jpg and/or png. You need to install from a binary to get all delegates or install libjpeg. Also note the following regarding security restrictions on PDF files and how to fix that: https://stackoverflow.com/questions/52861946/imagemagick-not-authorized-to-convert-pdf-to-an-image/52863413#52863413. What is your platform? See https://imagemagick.org/script/download.php – fmw42 Jan 02 '19 at 19:06

1 Answers1

0

I have tried answer from here and worked:
https://www.imagemagick.org/discourse-server/viewtopic.php?t=17117

wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar xvfz ImageMagick.tar.gz
cd ImageMagick-*
./configure
make
make install