Page 1 of 1

WIN10-64bit w/IM7.0.8-11Q16x64 & GS9.19: PDFDelegateFailed

Posted: 2018-09-13T23:01:59-07:00
by rosros
In 64-bit Windows 10, with ImageMagick 7.0.8-11 Q16 x64 and GPL Ghostscript 9.19 (64-bit) I can convert pdf to png with gs (gs bin directory is in the path):

>gswin64c -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=test.png" test.pdf

however magick fails

>magick test.pdf test.png
magick: PDFDelegateFailed `[ghostscript library 9.19] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=C:/WINDOWS/TEMP/magick-13872RQEqspuFpc_L%d" "-fC:/WINDOWS/TEMP/magick-13872xbovPp3bVzdm" "-fC:/WINDOWS/TEMP/magick-13872hKFzYKrwnQDt": (null)' @ error/pdf.c/ReadPDFImage/796.

The registry entry "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\GPL Ghostscript\9.19" contains GS_DLL => G:\DTP\gs919\bin\gsdll64.dll and<br/>
GS_LIB => G:\DTP\gs919\bin;G:\DTP\gs919\lib;G:\DTP\gs919\fonts

Is there a solution?

Re: WIN10-64bit w/IM7.0.8-11Q16x64 & GS9.19: PDFDelegateFailed

Posted: 2018-09-13T23:34:21-07:00
by fmw42
Either you did not install Ghostscript so that Imagmagick could fine it or the install was bad. When you do

convert -version

or

convert -list configure | grep "DELEGATES"

is gs or glib listed?

Also GS 9.19 is old. You might upgrading to the latest, which I think is GS 9.25.

Also did you install the Ghostscript fonts>

Re: WIN10-64bit w/IM7.0.8-11Q16x64 & GS9.19: PDFDelegateFailed

Posted: 2018-09-14T00:41:22-07:00
by rosros
Dear fmw42,
I removed both IM and GS. Installed GS 9.25. Installed IM again.
After restarting WIN10 this is the outcome in my Terminal:

>magick -list configure
-------------------------------------------------------------------------------
Name Value
FEATURES OpenMP
NAME ImageMagick
QuantumDepth 16
Path: G:\GRAPHICS\ImageMagick\ImageMagick-7.0.8-Q16-HDRI\configure.xml
-------------------------------------------------------------------------------
Name Value
-------------------------------------------------------------------------------
CC vs10
COPYRIGHT Copyright (C) 1999-2018 ImageMagick Studio LLC
DELEGATES bzlib freetype jpeg jp2 lcms png raw tiff x11 xml wmf zlib
FEATURES OpenMP
HOST Windows
LIB_VERSION 0x708
LIB_VERSION_NUMBER 7,0,8,11
NAME ImageMagick
RELEASE_DATE 2018-09-01
VERSION 7.0.8
WEBSITE http://www.imagemagick.org

[no glib in DELEGATES ?]

c:\temp>magick test.pdf test.png
magick: PDFDelegateFailed `[ghostscript library 9.25] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=C:/WINDOWS/TEMP/magick-7300Vjknu3ACXxOU%d" "-fC:/WINDOWS/TEMP/magick-7300-5tOIYN1KAZD" "-fC:/WINDOWS/TEMP/magick-7300MXP-0EFJmhp8": (null)' @ error/pdf.c/ReadPDFImage/796.

[BTW, in order to avoid problems with MS "convert" (to converts a FAT volume to NTFS), I prefer "magick" over the legacy "convert"; anyhow after making sure that "G:\GRAPHICS\ImageMagick\ImageMagick-7.0.8-Q16-HDRI" is the first entry in my PATH:]

c:\temp>convert test.pdf test.png
convert: PDFDelegateFailed `[ghostscript library 9.25] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=C:/WINDOWS/TEMP/magick-7728b9NBP2uP255N%d" "-fC:/WINDOWS/TEMP/magick-7728WdrVbQfLSi2A" "-fC:/WINDOWS/TEMP/magick-7728KsqI_EMtcKD7": (null)' @ error/pdf.c/ReadPDFImage/796.
convert: no images defined `test.png' @ error/convert.c/ConvertImageCommand/3288.

Re: WIN10-64bit w/IM7.0.8-11Q16x64 & GS9.19: PDFDelegateFailed

Posted: 2018-09-14T01:07:17-07:00
by rosros
------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------
>convert test.pdf test.png -debug all
2018-09-14T10:00:22+02:00 0:00.004 0.016u 7.0.8 Configure convert[2908]: utility.c/ExpandFilenames/959/Configure
Command line: convert {test.pdf} {test.png} {-debug} {all}
2018-09-14T10:00:22+02:00 0:00.015 0.016u 7.0.8 Policy convert[2908]: policy.c/IsRightsAuthorized/609/Policy
Domain: Module; rights=Read; pattern="PDF" ...
2018-09-14T10:00:22+02:00 0:00.019 0.016u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2034/Configure
SOFTWARE\ImageMagick\7.0.8\Q:16
2018-09-14T10:00:22+02:00 0:00.024 0.016u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2052/Configure
ConfigurePath
2018-09-14T10:00:22+02:00 0:00.028 0.016u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2034/Configure
SOFTWARE\ImageMagick\7.0.8\Q:16
2018-09-14T10:00:22+02:00 0:00.032 0.016u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2052/Configure
ConfigurePath
2018-09-14T10:00:22+02:00 0:00.036 0.016u 7.0.8 Configure convert[2908]: configure.c/GetConfigureOptions/687/Configure
Searching for configure file: "G:\GRAPHICS\ImageMagick\ImageMagick-7.0.8-Q16-HDRI\coder.xml"
2018-09-14T10:00:22+02:00 0:00.042 0.031u 7.0.8 Configure convert[2908]: configure.c/GetConfigureOptions/687/Configure
Searching for configure file: "C:\Users\RR2\AppData\Local\ImageMagick\coder.xml"
2018-09-14T10:00:22+02:00 0:00.047 0.031u 7.0.8 Configure convert[2908]: coder.c/LoadCoderCache/818/Configure
Loading coder configuration file "G:\GRAPHICS\ImageMagick\ImageMagick-7.0.8-Q16-HDRI\coder.xml" ...
2018-09-14T10:00:22+02:00 0:00.054 0.031u 7.0.8 Module convert[2908]: module.c/OpenModule/1272/Module
Searching for module "PDF" using filename "IM_MOD_RL_PDF_.dll"
2018-09-14T10:00:22+02:00 0:00.058 0.031u 7.0.8 Module convert[2908]: module.c/GetMagickModulePath/546/Module
Searching for coder module file "IM_MOD_RL_PDF_.dll" ...
2018-09-14T10:00:22+02:00 0:00.063 0.031u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2034/Configure
SOFTWARE\ImageMagick\7.0.8\Q:16
2018-09-14T10:00:22+02:00 0:00.067 0.031u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2052/Configure
CoderModulesPath
2018-09-14T10:00:22+02:00 0:00.072 0.031u 7.0.8 Module convert[2908]: module.c/OpenModule/1281/Module
Opening module at path "G:\GRAPHICS\ImageMagick\ImageMagick-7.0.8-Q16-HDRI\modules\coders\IM_MOD_RL_PDF_.dll"
2018-09-14T10:00:22+02:00 0:00.078 0.031u 7.0.8 Module convert[2908]: module.c/OpenModule/1308/Module
Method "RegisterPDFImage" in module "PDF" at address 00007FFC6E322E80
2018-09-14T10:00:22+02:00 0:00.083 0.031u 7.0.8 Module convert[2908]: module.c/OpenModule/1322/Module
Method "UnregisterPDFImage" in module "PDF" at address 00007FFC6E3231D0
2018-09-14T10:00:22+02:00 0:00.089 0.031u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2034/Configure
SOFTWARE\ImageMagick\7.0.8\Q:16
2018-09-14T10:00:22+02:00 0:00.093 0.031u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2052/Configure
ConfigurePath
2018-09-14T10:00:22+02:00 0:00.097 0.031u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2034/Configure
SOFTWARE\ImageMagick\7.0.8\Q:16
2018-09-14T10:00:22+02:00 0:00.101 0.031u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2052/Configure
ConfigurePath
2018-09-14T10:00:22+02:00 0:00.105 0.031u 7.0.8 Configure convert[2908]: configure.c/GetConfigureOptions/687/Configure
Searching for configure file: "G:\GRAPHICS\ImageMagick\ImageMagick-7.0.8-Q16-HDRI\magic.xml"
2018-09-14T10:00:22+02:00 0:00.111 0.031u 7.0.8 Configure convert[2908]: configure.c/GetConfigureOptions/687/Configure
Searching for configure file: "C:\Users\RR2\AppData\Local\ImageMagick\magic.xml"
2018-09-14T10:00:22+02:00 0:00.117 0.031u 7.0.8 Configure convert[2908]: magic.c/LoadMagicCache/849/Configure
Loading magic configure file "G:\GRAPHICS\ImageMagick\ImageMagick-7.0.8-Q16-HDRI\magic.xml" ...
2018-09-14T10:00:22+02:00 0:00.123 0.031u 7.0.8 Policy convert[2908]: policy.c/IsRightsAuthorized/609/Policy
Domain: Path; rights=Read; pattern="test.pdf" ...
2018-09-14T10:00:22+02:00 0:00.128 0.031u 7.0.8 Blob convert[2908]: blob.c/OpenBlob/3383/Blob
read 3 magic header bytes
2018-09-14T10:00:22+02:00 0:00.132 0.031u 7.0.8 Cache convert[2908]: cache.c/DestroyPixelCache/1056/Cache
destroy
2018-09-14T10:00:22+02:00 0:00.136 0.031u 7.0.8 Policy convert[2908]: policy.c/IsRightsAuthorized/609/Policy
Domain: Coder; rights=Read; pattern="PDF" ...
2018-09-14T10:00:22+02:00 0:00.140 0.031u 7.0.8 Policy convert[2908]: policy.c/IsRightsAuthorized/609/Policy
Domain: Path; rights=Read; pattern="test.pdf" ...
2018-09-14T10:00:22+02:00 0:00.146 0.047u 7.0.8 Blob convert[2908]: blob.c/OpenBlob/3383/Blob
read 3 magic header bytes
2018-09-14T10:00:22+02:00 0:00.149 0.047u 7.0.8 Resource convert[2908]: resource.c/AcquireUniqueFileResource/550/Resource
...
2018-09-14T10:00:22+02:00 0:00.156 0.047u 7.0.8 Resource convert[2908]: resource.c/AcquireUniqueFileResource/606/Resource
C:/WINDOWS/TEMP/magick-2908eLr-8OnuJM2L
2018-09-14T10:00:22+02:00 0:00.166 0.047u 7.0.8 Resource convert[2908]: resource.c/AcquireUniqueFileResource/550/Resource
...
2018-09-14T10:00:22+02:00 0:00.172 0.047u 7.0.8 Resource convert[2908]: resource.c/AcquireUniqueFileResource/606/Resource
C:/WINDOWS/TEMP/magick-2908ZxxUCV5CUBJk
2018-09-14T10:00:22+02:00 0:00.177 0.063u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2034/Configure
SOFTWARE\ImageMagick\7.0.8\Q:16
2018-09-14T10:00:22+02:00 0:00.182 0.063u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2052/Configure
ConfigurePath
2018-09-14T10:00:22+02:00 0:00.186 0.063u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2034/Configure
SOFTWARE\ImageMagick\7.0.8\Q:16
2018-09-14T10:00:22+02:00 0:00.191 0.063u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2052/Configure
ConfigurePath
2018-09-14T10:00:22+02:00 0:00.194 0.063u 7.0.8 Configure convert[2908]: configure.c/GetConfigureOptions/687/Configure
Searching for configure file: "G:\GRAPHICS\ImageMagick\ImageMagick-7.0.8-Q16-HDRI\delegates.xml"
2018-09-14T10:00:22+02:00 0:00.201 0.063u 7.0.8 Configure convert[2908]: configure.c/GetConfigureOptions/687/Configure
Searching for configure file: "C:\Users\RR2\AppData\Local\ImageMagick\delegates.xml"
2018-09-14T10:00:22+02:00 0:00.207 0.063u 7.0.8 Configure convert[2908]: delegate.c/LoadDelegateCache/2014/Configure
Loading delegate configuration file "G:\GRAPHICS\ImageMagick\ImageMagick-7.0.8-Q16-HDRI\delegates.xml" ...
2018-09-14T10:00:22+02:00 0:00.214 0.063u 7.0.8 Configure convert[2908]: nt-base.c/NTLocateGhostscript/1206/Configure
Ghostscript (GPL Ghostscript) version 9.25
2018-09-14T10:00:22+02:00 0:00.220 0.063u 7.0.8 Configure convert[2908]: nt-base.c/NTGhostscriptGetString/1305/Configure
registry: "HKEY_LOCAL_MACHINE\SOFTWARE\GPL Ghostscript\9.25\GS_DLL"="G:\DTP\gs925\bin\gsdll64.dll"
2018-09-14T10:00:22+02:00 0:00.227 0.078u 7.0.8 Resource convert[2908]: resource.c/AcquireUniqueFileResource/550/Resource
...
2018-09-14T10:00:22+02:00 0:00.233 0.078u 7.0.8 Resource convert[2908]: resource.c/AcquireUniqueFileResource/606/Resource
C:/WINDOWS/TEMP/magick-2908fSitP3zJTZD9
2018-09-14T10:00:22+02:00 0:00.240 0.078u 7.0.8 Resource convert[2908]: resource.c/RelinquishUniqueFileResource/1053/Resource
C:/WINDOWS/TEMP/magick-2908fSitP3zJTZD9
2018-09-14T10:00:22+02:00 0:00.246 0.078u 7.0.8 Configure convert[2908]: nt-base.c/NTGhostscriptGetString/1305/Configure
registry: "HKEY_LOCAL_MACHINE\SOFTWARE\GPL Ghostscript\9.25\GS_DLL"="G:\DTP\gs925\bin\gsdll64.dll"
2018-09-14T10:00:23+02:00 0:00.519 0.375u 7.0.8 Resource convert[2908]: resource.c/RelinquishUniqueFileResource/1053/Resource
C:/WINDOWS/TEMP/magick-2908ZxxUCV5CUBJk
2018-09-14T10:00:23+02:00 0:00.525 0.375u 7.0.8 Resource convert[2908]: resource.c/RelinquishUniqueFileResource/1053/Resource
C:/WINDOWS/TEMP/magick-2908eLr-8OnuJM2L
2018-09-14T10:00:23+02:00 0:00.532 0.375u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2034/Configure
SOFTWARE\ImageMagick\7.0.8\Q:16
2018-09-14T10:00:23+02:00 0:00.536 0.375u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2052/Configure
ConfigurePath
2018-09-14T10:00:23+02:00 0:00.540 0.391u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2034/Configure
SOFTWARE\ImageMagick\7.0.8\Q:16
2018-09-14T10:00:23+02:00 0:00.544 0.391u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2052/Configure
ConfigurePath
2018-09-14T10:00:23+02:00 0:00.549 0.391u 7.0.8 Locale convert[2908]: locale.c/GetLocaleOptions/859/Locale
Searching for locale file: "G:\GRAPHICS\ImageMagick\ImageMagick-7.0.8-Q16-HDRI\locale.xml"
2018-09-14T10:00:23+02:00 0:00.554 0.391u 7.0.8 Locale convert[2908]: locale.c/GetLocaleOptions/859/Locale
Searching for locale file: "C:\Users\RR2\AppData\Local\ImageMagick\locale.xml"
2018-09-14T10:00:23+02:00 0:00.560 0.391u 7.0.8 Configure convert[2908]: locale.c/LoadLocaleCache/1211/Configure
Loading locale configure file "G:\GRAPHICS\ImageMagick\ImageMagick-7.0.8-Q16-HDRI\locale.xml" ...
2018-09-14T10:00:23+02:00 0:00.566 0.391u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2034/Configure
SOFTWARE\ImageMagick\7.0.8\Q:16
2018-09-14T10:00:23+02:00 0:00.571 0.391u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2052/Configure
ConfigurePath
2018-09-14T10:00:23+02:00 0:00.574 0.391u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2034/Configure
SOFTWARE\ImageMagick\7.0.8\Q:16
2018-09-14T10:00:23+02:00 0:00.580 0.391u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2052/Configure
ConfigurePath
2018-09-14T10:00:23+02:00 0:00.583 0.391u 7.0.8 Locale convert[2908]: locale.c/GetLocaleOptions/859/Locale
Searching for locale file: "G:\GRAPHICS\ImageMagick\ImageMagick-7.0.8-Q16-HDRI\english.xml"
2018-09-14T10:00:23+02:00 0:00.590 0.391u 7.0.8 Locale convert[2908]: locale.c/GetLocaleOptions/859/Locale
Searching for locale file: "C:\Users\RR2\AppData\Local\ImageMagick\english.xml"
2018-09-14T10:00:23+02:00 0:00.596 0.391u 7.0.8 Configure convert[2908]: locale.c/LoadLocaleCache/1211/Configure
Loading locale configure file "G:\GRAPHICS\ImageMagick\ImageMagick-7.0.8-Q16-HDRI\english.xml" ...
2018-09-14T10:00:23+02:00 0:00.638 0.422u 7.0.8 Exception convert[2908]: pdf.c/ReadPDFImage/796/Exception
PDFDelegateFailed `[ghostscript library 9.25] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=C:/WINDOWS/TEMP/magick-2908fSitP3zJTZD9%d" "-fC:/WINDOWS/TEMP/magick-2908ZxxUCV5CUBJk" "-fC:/WINDOWS/TEMP/magick-2908eLr-8OnuJM2L": (null)'
2018-09-14T10:00:23+02:00 0:00.653 0.422u 7.0.8 Cache convert[2908]: cache.c/DestroyPixelCache/1056/Cache
destroy
2018-09-14T10:00:23+02:00 0:00.657 0.422u 7.0.8 Policy convert[2908]: policy.c/IsRightsAuthorized/609/Policy
Domain: Module; rights=Read; pattern="PNG" ...
2018-09-14T10:00:23+02:00 0:00.662 0.422u 7.0.8 Module convert[2908]: module.c/OpenModule/1272/Module
Searching for module "PNG" using filename "IM_MOD_RL_PNG_.dll"
2018-09-14T10:00:23+02:00 0:00.667 0.422u 7.0.8 Module convert[2908]: module.c/GetMagickModulePath/546/Module
Searching for coder module file "IM_MOD_RL_PNG_.dll" ...
2018-09-14T10:00:23+02:00 0:00.672 0.422u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2034/Configure
SOFTWARE\ImageMagick\7.0.8\Q:16
2018-09-14T10:00:23+02:00 0:00.677 0.422u 7.0.8 Configure convert[2908]: nt-base.c/NTRegistryKeyLookup/2052/Configure
CoderModulesPath
2018-09-14T10:00:23+02:00 0:00.681 0.422u 7.0.8 Module convert[2908]: module.c/OpenModule/1281/Module
Opening module at path "G:\GRAPHICS\ImageMagick\ImageMagick-7.0.8-Q16-HDRI\modules\coders\IM_MOD_RL_PNG_.dll"
2018-09-14T10:00:23+02:00 0:00.743 0.438u 7.0.8 Module convert[2908]: module.c/OpenModule/1308/Module
Method "RegisterPNGImage" in module "PNG" at address 00007FFC6851D250
2018-09-14T10:00:23+02:00 0:00.749 0.438u 7.0.8 Module convert[2908]: module.c/OpenModule/1322/Module
Method "UnregisterPNGImage" in module "PNG" at address 00007FFC6851D9C0
2018-09-14T10:00:23+02:00 0:00.755 0.453u 7.0.8 Policy convert[2908]: policy.c/IsRightsAuthorized/609/Policy
Domain: Path; rights=Read; pattern="test.png" ...
2018-09-14T10:00:23+02:00 0:00.759 0.453u 7.0.8 Exception convert[2908]: blob.c/OpenBlob/3489/Exception
unable to open image 'test.png': No such file or directory
2018-09-14T10:00:23+02:00 0:00.765 0.453u 7.0.8 Cache convert[2908]: cache.c/DestroyPixelCache/1056/Cache
destroy
2018-09-14T10:00:23+02:00 0:00.768 0.453u 7.0.8 Policy convert[2908]: policy.c/IsRightsAuthorized/609/Policy
Domain: Path; rights=Read; pattern="test.png" ...
2018-09-14T10:00:23+02:00 0:00.773 0.453u 7.0.8 Exception convert[2908]: blob.c/OpenBlob/3489/Exception
unable to open image 'test.png': No such file or directory
2018-09-14T10:00:23+02:00 0:00.778 0.453u 7.0.8 Cache convert[2908]: cache.c/DestroyPixelCache/1056/Cache
destroy
2018-09-14T10:00:23+02:00 0:00.784 0.453u 7.0.8 Exception convert[2908]: convert.c/ConvertImageCommand/3285/Exception
`all'
convert: PDFDelegateFailed `[ghostscript library 9.25] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=C:/WINDOWS/TEMP/magick-2908fSitP3zJTZD9%d" "-fC:/WINDOWS/TEMP/magick-2908ZxxUCV5CUBJk" "-fC:/WINDOWS/TEMP/magick-2908eLr-8OnuJM2L": (null)' @ error/pdf.c/ReadPDFImage/796.
convert: unable to open image 'test.png': No such file or directory @ error/blob.c/OpenBlob/3489.
convert: `all' @ error/convert.c/ConvertImageCommand/3285.
------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------
G:\>dir IM_MOD_RL_PDF_.dll/s
Volume in drive G is PROGRAMS
Volume Serial Number is 2EAF-71EF

Directory of G:\GRAPHICS\ImageMagick\ImageMagick-7.0.8-Q16-HDRI\modules\coders

20180829 10:18 AM 55,352 IM_MOD_RL_pdf_.dll
1 File(s) 55,352 bytes
------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------

Re: WIN10-64bit w/IM7.0.8-11Q16x64 & GS9.19: PDFDelegateFailed

Posted: 2018-09-14T03:14:27-07:00
by snibgo
rosros wrote:... "-fC:/WINDOWS/TEMP/magick-13872hKFzYKrwnQDt": (null)' @ error/pdf.c/ReadPDFImage/796.
That final "(null)" is wrong. It should be the input file to GS, written by IM.

Perhaps that version of IM has a bug. Or perhaps test.pdf contains something weird. Does this happen with all PDFs, or just that one?

EDIT: And there is a superfluous colon, which suggests IM is confused (yet again) by Windows "C:" etc.

Check that "C:/WINDOWS/TEMP/" exists, and you can create files in there.

I suggest you try:

Code: Select all

set MAGICK_TEMPORARY_PATH=.
... before your command. This will put temporary files in the current directory instead of %TEMP%. Does that cure the problem?

[SOLVED] Re: WIN10-64bit w/IM7.0.8-11Q16x64 & GS9.19: PDFDelegateFailed

Posted: 2018-09-14T05:14:15-07:00
by rosros
Dear snibgo, I confirm that your solution does work in my system:

c:\test>set MAGICK_TEMPORARY_PATH=.

c:\test>magick test.pdf test.png

c:\test>magick Document.pdf Document.png

c:\test>dir *.png
Volume in drive C is WINDOWS
Volume Serial Number is 623A-26AE

Directory of c:\test

20180914 02:03 PM 39,978 Document.png
20180914 02:01 PM 39,796 test.png
2 File(s) 79,774 bytes
0 Dir(s) 55,065,948,160 bytes free

THANKS!

Re: WIN10-64bit w/IM7.0.8-11Q16x64 & GS9.19: PDFDelegateFailed

Posted: 2018-09-14T05:42:06-07:00
by snibgo
Good stuff. This is a workaround to what seems to be a bug in IM. IM should handle "C:" at the start of filenames correctly. Perhaps a developer will look at this.

Re: WIN10-64bit w/IM7.0.8-11Q16x64 & GS9.19: PDFDelegateFailed

Posted: 2018-09-14T07:16:48-07:00
by dlemstra
Does the folder c:\windows\temp exist on your system? I suspect that you have an incorrect value set for %temp%.

Re: WIN10-64bit w/IM7.0.8-11Q16x64 & GS9.19: PDFDelegateFailed

Posted: 2018-09-14T09:31:29-07:00
by rosros
c:\>echo %temp%
C:\WINDOWS\TEMP
c:\>cd temp
c:\TEMP>

Re: WIN10-64bit w/IM7.0.8-11Q16x64 & GS9.19: PDFDelegateFailed

Posted: 2018-09-14T09:34:02-07:00
by rosros
c:\TEMP>magick Document.pdf Document.jpg
magick: PDFDelegateFailed `[ghostscript library 9.25] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=C:/WINDOWS/TEMP/magick-10540AQhF5YoEsUSB%d" "-fC:/WINDOWS/TEMP/magick-10540SI6NJmweq8RF" "-fC:/WINDOWS/TEMP/magick-10540ec8-RdzpUG6c": (null)' @ error/pdf.c/ReadPDFImage/796.

c:\TEMP>set MAGICK_TEMPORARY_PATH=.

c:\TEMP>magick Document.pdf Document.jpg

c:\TEMP>dir *.jpg
Volume in drive C is WINDOWS
Volume Serial Number is 623A-26AE

Directory of c:\TEMP

20180914 06:33 PM 82,204 Document.jpg
1 File(s) 82,204 bytes
0 Dir(s) 54,788,407,296 bytes free

Re: WIN10-64bit w/IM7.0.8-11Q16x64 & GS9.19: PDFDelegateFailed

Posted: 2018-09-14T13:21:23-07:00
by dlemstra
C:\WINDOWS\TEMP != c:\TEMP ?

Re: WIN10-64bit w/IM7.0.8-11Q16x64 & GS9.19: PDFDelegateFailed

Posted: 2018-09-14T23:49:09-07:00
by rosros
Both directories are there; is this important?

c:\temp>echo %temp%

C:\WINDOWS\TEMP

c:\temp>cd \windows\temp

c:\Windows\Temp>dir
Volume in drive C is WINDOWS
Volume Serial Number is 623A-26AE
Directory of c:\Windows\Temp
File Not Found

Re: WIN10-64bit w/IM7.0.8-11Q16x64 & GS9.19: PDFDelegateFailed

Posted: 2018-09-15T02:05:08-07:00
by dlemstra
It is very important because we are not sure if you are allowed to write inside the c:\windows\temp directory. And can you create a file there? That does not work on my machine and that is probably why imagemagick fails to convert the pdf file when that folder is used as a temporary directory.

The temp folder is also `TEMP=C:\Users\Dirk\AppData\Local\Temp` on my machine. Wonder why this is different on your machine.

Re: WIN10-64bit w/IM7.0.8-11Q16x64 & GS9.19: PDFDelegateFailed

Posted: 2018-09-15T05:49:49-07:00
by rosros
I have changed my "TEMP" system environment variable to "C:\TEMP". Now the conversion procedure works:

C:\TEMP>echo %temp%
C:\TEMP

C:\TEMP>cd /test

C:\test>magick test.pdf test.jpg

BTW, it seems that as a normal user I am also allowed to write inside c:\windows\temp

C:\test>cd %systemroot%\temp

C:\Windows\Temp>echo "test test test" > test.txt

C:\Windows\Temp>type test.txt
"test test test"

THANKS.

Re: WIN10-64bit w/IM7.0.8-11Q16x64 & GS9.19: PDFDelegateFailed

Posted: 2018-09-15T05:53:32-07:00
by dlemstra
I get the following:

Code: Select all

C:\Users\Dirk>cd C:\Windows\Temp

C:\Windows\Temp>echo "test test test" > test.txt

C:\Windows\Temp>type test.txt
Access is denied.