Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ghostscript call by imagick doesn't work #713

Open
pal-crystal opened this issue Feb 28, 2025 · 0 comments
Open

Ghostscript call by imagick doesn't work #713

pal-crystal opened this issue Feb 28, 2025 · 0 comments

Comments

@pal-crystal
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant