Xampp - PHP Imagick does not work with Ghostscript in local

787 views Asked by At

I successfully installed Imagick version 3.4.4 on PHP 7.2.18 in my XAMPP for windows 10. I tried to launch the phpinfo.php file and I see correctly configured imagick.

My site is with Magento 1.9.4.3. I'm on the client account page and I just tried to run this code to see if imagick exists and everything works fine:

if (class_exists('imagick')) {echo "imagick exist";} else {echo "class imagick not exist";}

After this I installed ghostscript 9.50 for win 32. I installed ghostscript in the main root of xampp. After the installation of Ghostscript too I immediately tried to have a pdf file read in this way and unfortunately the page returns blank:

$Filename = Mage::getBaseDir().DS.'clienti'.DS.$customerName.DS."flooop.pdf";

$im = new imagick();
$im->readImage($Filename);

The error I saw from the var / log / exception.log file is this:

ImagickException: PDFDelegateFailed `system cannot find the file specified.

' @ error/pdf.c/ReadPDFImage/794 in C:\xampp\htdocs\higiftit\app\design\frontend\sns_toronto\default\template\customer\upload\area-invio-file.phtml:186

I tried everything but unfortunately the same error always returns. How could I do?

0

There are 0 answers