Skip to content

Ghostscript call by imagick doesn't work #713

Open
@pal-crystal

Description

@pal-crystal

Hello,
When I try to read a PDF file using ImageMagick, I get the following error:

FailedToExecuteCommand `"gs" -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -dPrinted=false "-sOutputFile=C:/Windows/Temp/magick-EiPahc9vqdebEOr6FyGebXUtdvdnbkCR%d" "-fC:/Windows/Temp/magick-JrCpT5D2h7GripA-J4fVVOokeOALe6L_" "-fC:/Windows/Temp/magick-1UzILqi65SYHnywPRkM8k5TdZWfTL1CB"' (The specified file could not be found.) **@ error/delegate.c/ExternalDelegateCommand/516**
`

I have configured the environment variable in Apache as follows:

SetEnv MAGICK_CONFIGURE_PATH "C:\laragon\bin\php\php-8.3.15-nts-Win32-vs16-x64\config"

And placed my configuration files in that folder.

Here is my configuration file (delegates.xml):

<?xml version="1.0"?>
<!DOCTYPE delegatemap [
  ...
  <delegate decode="pdf" encode="eps" mode="bi" command="&quot;gswin64c&quot; -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -sDEVICE=eps2write &quot;-sPDFPassword=%a&quot; &quot;-sOutputFile=%o&quot; -- &quot;%i&quot;"/>
  <delegate decode="pdf" encode="ps" mode="bi" command="&quot;gswin64c&quot; -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 -sDEVICE=ps2write -&quot;sPDFPassword=%a&quot; &quot;-sOutputFile=%o&quot; -- &quot;%i&quot;"/>
  ...
</delegatemap>

I replaced @PSDelegate@ with gswin64c, but ImageMagick continues to call gs, which does not exist.

Any ideas or suggestions?
Thank you for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions