iMagic + gostscript in PHP 7.2 (WAMP) problem

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Quark Zimmerman
Posts: 1
Joined: 2019-02-12T10:23:18-07:00
Authentication code: 1152

iMagic + gostscript in PHP 7.2 (WAMP) problem

Post by Quark Zimmerman »

Hi ,
It looks like there is a problem when attempting to use imagick PDF from Php 7.2 .

I just moved to PHP 7.2 on WAMP and wanted to use imagick to read image files and PDFs same way I did on 7.1 .

So I installed (copied to ext folder) newest PHP extension from : https://windows.php.net/downloads/pecl/ ... ick/3.4.3/ ( php_imagick-3.4.3-7.2-ts-vc15-x64.zip )
( basically again followed the instructions: https://herbmiller.me/installing-imagick-php-7/ )

Then installed (unpacked) imagick run times from: https://windows.php.net/downloads/pecl/deps/ ( ImageMagick-7.0.7-11-vc15-x64.zip ) to separate folder , set path to it , set IMAGICK_HOME variable , restarted ...

The extensions loads, the I magick - works on regular files (.BMP , .JPG, ...) but it refuses to open .PDF with "NoDecodeDelegateForThisImageFormat `PDF' @ error/constitute.c/ReadImage/509" exception.

Ghost script for Windows is installed and worked OK with PHP 7.1 using proper extension , but instead of distributive in the link above I used "normal" 7.0.7. installation.
Here I tried to use "distributive" because PHP 7.2 compiled with VC15 and extension as well, so I needed imagick compiled with VC15, otherwise it will not work.
So first thing I checked in standard installation is delegate.xml files and other .xml are missing from the distributive I used for PHP , so I copied them over.
Did not helped.

So as for now - no way to run Ghostscript from PHP/imagick , probably I missing something.
Need help :)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: iMagic + gostscript in PHP 7.2 (WAMP) problem

Post by fmw42 »

See https://stackoverflow.com/questions/528 ... 3#52863413. Also you may need to add the full path to Ghostscript in your delegates.xml file for all the PS encodes.
Post Reply