415 - Postscript Delegate Failed

ImageMagickObject is a Windows COM+ interface to ImageMagick. COM+, Visual Basic, and Delphi users should post to this discussion group.
firstarticle

415 - Postscript Delegate Failed

Post by firstarticle »

Can anyone please tell me what I'm doing wrong? I have used IM from the command line for a couple of years to convert pdf files for viewing on the web. I decided that it would make more sense to let IM do it programmatically when a user requests a web file that doesn't exist. Our website is written in asp and I wanted to try a quick demo to see if it would work. Unfortunately, I keep getting this error.

-2147215503: convert: 415: Postscript delegate failed `c:\xxx\yyy\zzz\images\quickevac.pdf': No such file or directory: convert: 410: missing an image filename `c:\xxx\yyy\zzz\images\quickevac.png': ImageMagickObject info:

I've gone through the forums and haven't found the solution yet.

It works from the command line and it works as a .vbs file, just not from the asp page. I've tried IE, Firefox and Safari, no joy.
Any help would be greatly appreciated. Thank you in advance.

I'm using the following software versions:

WindowsXP SP2
IIS V5.1
ImageMagick-6.3.7-Q16
Ghostscript8.61

Permissions on the IM and GS folders set to Everyone-Full Control
Path=> C:\Program Files\gs\gs8.61\bin\;C:\Program Files\imagemagick-6.3.7-q16\......

Here is the asp code. It's basically the same as SimpleTest.vbs that comes with the ImageMagickObject, which works perfectly with the same file.

<%Option Explicit

On Error Resume Next
Const ERROR_SUCCESS = 0

Dim img
Dim info
Dim msgs
Dim elem
Dim sMsgs

Set img = CreateObject("ImageMagickObject.MagickImage.1")

msgs=img.Convert("c:\xxx\yyy\zzz\images\quickevac.pdf", "c:\xxx\yyy\zzz\images\quickevac.png")

If Err.Number <> ERROR_SUCCESS Then ShowError: WScript.Quit
Response.Write("info: " & msgs)
Set img=Nothing
WScript.Quit(0)

Sub ShowError
sMsgs = ""
If BasicError(Err.Number) > 5000 Then
sMsgs = " ImageMagickObject" & vbCrLf
End If
Response.Write(Err.Number & ": " & Err.Description & vbCrLf & sMsgs)
End Sub

Function BasicError(e)
BasicError = e And &HFFFF&
End Function
%>
firstarticle

Re: 415 - Postscript Delegate Failed

Post by firstarticle »

Update:
I have reinstalled IM(Updated to latest build 6.3.8 Q16) and GhostScript(8.61) to the root of C:\ drive.
Changed all of the @PSDelegate@ to gswin32.exe in the delegates.xml
Updated the Path

The command line and .vbs still work. The ASP page still does not. However, I don't get any errors, the browser just keeps "Waiting for localhost". Seems like something is locking up. Nothing in the Event Viewer or IIS logs.

Any other ideas?

Thanks.
InvisibleMan1002

Re: 415 - Postscript Delegate Failed

Post by InvisibleMan1002 »

I feel your pain.
I'm fighting over the same thing.
I just posted my trials.(viewtopic.php?f=8&t=10883)

I downgraded to a previous version I had (6.2.9) and my problems went away.

I hope you get it figured out.

If you want to try the previous version and are unable to find it, let me know, I'll put it somewhere you can get it.

-Trey Aughenbaugh
firstarticle

Re: 415 - Postscript Delegate Failed

Post by firstarticle »

Trey,

I did as you said (slightly different version, downgraded to 6.2.4-5) and it worked perfectly! Not sure what the deal is with the 6.3 release or what I'm doing wrong.

I downloaded the 6.4.0 release today and I'm going to try that as well. Will let you know what I find. Thanks again.
firstarticle

Re: 415 - Postscript Delegate Failed

Post by firstarticle »

Unfortunately, I'm back to the same -2147215503: convert: 415: Postscript delegate failed error with version 6.4.0-0 :?

Hopefully, someone here can tell us what we're doing wrong with the latest builds of ImageMagick. Until then, it's 6.2 for me.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 415 - Postscript Delegate Failed

Post by magick »

The developers will investigate this problem and offer a patch if you can instruct us in the simplest way to reproduce the problem. We are not well versed in Windows/ASP so a step-by-step guide how to produce the problem under Windows would be helpful.
InvisibleMan1002

Re: 415 - Postscript Delegate Failed

Post by InvisibleMan1002 »

Good to know it is not just me!
Thanks for the update.

If you want to try the version I am using, I can place it somewhere you can get to it.

-trey
firstarticle

Re: 415 - Postscript Delegate Failed

Post by firstarticle »

This is the easiest idea I could come up with. If you provide me an email address, I can send you a zip file that has the asp page and pdf that I used for testing. Just drop the extracted folder into the wwwroot directory on an IIS equipped machine and hit it with a browser. (http://localhost/testing/simpletest_pdf.asp)

Please let me know if this works for you. Thanks.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 415 - Postscript Delegate Failed

Post by magick »

Press the PM button right below this message and you can send us anything you want privately. We are interested in getting this problem fixed. Thanks for your assistance.
firstarticle

Re: 415 - Postscript Delegate Failed

Post by firstarticle »

Sent the zip file. Please let me know if you need anything else. Thanks.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 415 - Postscript Delegate Failed

Post by magick »

ImageMagick uses Ghostscript to interpret the PDF format. On our system, Ghostscript generates a segmentation fault on your image but works on another system where we are using Ghostscript 8.6.0. Create this image:
  • convert logo: logo.pdf
and try your ASP script. Does that work? If so the problem is with Ghostscript, try upgrading your release. If not, the problem could still be with ImageMagick and we will investigate further.
firstarticle

Re: 415 - Postscript Delegate Failed

Post by firstarticle »

I assume that I was to try this with Version 6.4.0.

When I run convert logo: logo.pdf from the command line, I get an error that says "Invalid Parameter - logo.pdf".

When I try to convert the same image from the asp page I get the following:
-2147215503: convert: 415: Postscript delegate failed `C:\Program Files\ImageMagick-6.4.0-Q16\images\logo.pdf': No such file or directory: convert: 410: missing an image filename `C:\Program Files\ImageMagick-6.4.0-Q16\images\logo.png': ImageMagickObject info:

I am using GhostScript 8.61.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 415 - Postscript Delegate Failed

Post by magick »

We ran your SimpleTest_pdf.asp script and got a 424: Object required info: exception. We verified that the SimpleTest.vbs script works without complaint. What do we need to do to fix this exception and permit your script to run to completion? Keep in mind we are not Windows developers so use small words.
firstarticle

Re: 415 - Postscript Delegate Failed

Post by firstarticle »

Sounds like it might be an issue with IIS or permissions. Just for testing purposes, can you set the permissions on the testing directory so that "Everyone" has Full Control?

Here are the properties of the testing directory in IIS.

Read, Log visits, Index this resource are checked
Execute Permissions: Scripts only

Please let me know if this helps. Thanks.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 415 - Postscript Delegate Failed

Post by magick »

We checked the permissions on the script and it has read and execute permission. The exception must be generated for some other reason.
Post Reply