Page 1 of 1

PDF to TIF failing - error/delegate.c

Posted: 2018-12-12T18:04:35-07:00
by longhorn999
Ran from command prompt "magick test.pdf test.tif"
Nasty error, says file not found. But the pdf file exists.
See cmd prompt dump below.
Any clues?

Directory of C:\temp\PDF

12/12/2018 06:45 PM <DIR> .
12/12/2018 06:45 PM <DIR> ..
06/27/2018 12:48 PM 160,819 test.pdf

C:\temp\PDF>magick test.pdf test.tif
magick: FailedToExecuteCommand `"gswin32c.exe" -q -dQUIET -dSAFER -dBATCH -dNOPA
USE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=p
ngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=C:/Use
rs/gkipe/AppData/Local/Temp/2/magick-4088kLVrYyyBB-zn%d" "-fC:/Users/jsmith/AppDa
ta/Local/Temp/2/magick-40883J7YmbXUn1_s" "-fC:/Users/jsmith/AppData/Local/Temp/2/
magick-4088IczyBkhwj5Hy"' (The system cannot find the file specified.
) @ error/delegate.c/ExternalDelegateCommand/475.
magick: PDFDelegateFailed `The system cannot find the file specified.
' @ error/pdf.c/ReadPDFImage/795.

Re: PDF to TIF failing - error/delegate.c

Posted: 2018-12-12T18:10:18-07:00
by fmw42
Are you sure that your file is in the directory you specified? I do not recommend processing from \temp. Does it have read/write permissions. Try putting your image in some other directory and see if the command works. Try without referencing the volume, since it is in C: and I presume your ImageMagick is there also.

Otherwise, this could be a missing Ghostscript issue or the recent change to the policy.xml file where you may need to edit the policy for reading PDF to change the permissions to read|write. See ... 3#52863413

Please always provide your IM version and platform/OS when asking questions on this forum

Re: PDF to TIF failing - error/delegate.c

Posted: 2018-12-12T21:51:48-07:00
by longhorn999
ImageMagick version: 7.0.8-16 Q16 x64
OS: WinServer 2008 R2 Enterprise

Running from a windows folder not named "temp", had no affect. Same error.

I added the line "<policy domain="module" rights="read|write" pattern="{PS,PDF,XPS}" />" to the policy.xml, as was suggested in the article. I needed to add the line, as there was nothing in the file with "PDF".

I verified the policy with the command "magick identify -list policy"
C:\PDF>magick identify -list policy

Path: C:\Program Files\ImageMagick-7.0.8-Q16\policy.xml
Policy: Module
rights: Read Write
pattern: {PS,PDF,XPS}

Path: [built-in]
Policy: Undefined
rights: None

The final results, were the same error. Changing the policy.xml had no affect.

Re: PDF to TIF failing - error/delegate.c

Posted: 2018-12-12T21:56:04-07:00
by longhorn999
To fmw42, what did you mean when you mentioned missing Ghostsript?
To run IM, we also need to install Ghostscript?

Re: PDF to TIF failing - error/delegate.c

Posted: 2018-12-12T22:14:12-07:00
by longhorn999
I installed Ghostscript.
And the command >magick test.pdf test.tif, did not fail.
I got a tif created. TIF image looks terrible, but now I need to add more parameters to the command.
Thanks, issue resolved.

Re: PDF to TIF failing - error/delegate.c

Posted: 2018-12-12T23:42:20-07:00
by fmw42
You need Ghostscript to read PDF/EPS/EPT/AI file formats. Otherwise, ImageMagick does not need Ghostscript.