PDF to TIF failing - error/delegate.c

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
longhorn999
Posts: 4
Joined: 2018-12-12T17:56:44-07:00
Authentication code: 1152

PDF to TIF failing - error/delegate.c

Post by longhorn999 » 2018-12-12T18:04:35-07:00

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.

User avatar
fmw42
Posts: 25029
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post by fmw42 » 2018-12-12T18:10:18-07:00

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 https://stackoverflow.com/questions/528 ... 3#52863413

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

longhorn999
Posts: 4
Joined: 2018-12-12T17:56:44-07:00
Authentication code: 1152

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

Post by longhorn999 » 2018-12-12T21:51:48-07:00

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.

longhorn999
Posts: 4
Joined: 2018-12-12T17:56:44-07:00
Authentication code: 1152

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

Post by longhorn999 » 2018-12-12T21:56:04-07:00

To fmw42, what did you mean when you mentioned missing Ghostsript?
To run IM, we also need to install Ghostscript?

longhorn999
Posts: 4
Joined: 2018-12-12T17:56:44-07:00
Authentication code: 1152

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

Post by longhorn999 » 2018-12-12T22:14:12-07:00

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.

User avatar
fmw42
Posts: 25029
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post by fmw42 » 2018-12-12T23:42:20-07:00

You need Ghostscript to read PDF/EPS/EPT/AI file formats. Otherwise, ImageMagick does not need Ghostscript.

Post Reply