0

I try to convert pdf to jpg. This is the simple code:

error_reporting(E_ALL);
$pdf8='https://my.novaposhta.ua/orders/printMarking100x100/orders[]/20450189416569/type/pdf8/apiKey/8c813355bb8499c718bea833483bba50';
$imagick = new Imagick();
$imagick->readImage($pdf8);//<!-- ImageMagick crashes here
$imagick->writeImage('./output.jpg');

ImageMagick crashes without any errors! So I cant event understand whats wrong. php.ini has memory_limit set to 2048M. I tried to reinstall ImageMagick but nothing changed.

I did this:

sudo apt-get purge imagemagick
sudo apt-get update
sudo apt-get install imagemagick -y
sudo apt-get install php5-imagick -y
sudo php5enmod imagick
sudo service apache2 restart

Please help! I have spant the whole day for this with no result. What do I do wrong? Or how can I convert pdf to jpg in other way?

Any help appriciated!

SuperYegorius
  • 754
  • 6
  • 24

0 Answers0