Re: 415 - Postscript Delegate Failed
Posted: 2008-05-06T09:02:41-07:00
Hi guys,
I have installed the latest build and have the latest GhostScript installed as well. My problem is that when handling a PDF, and trying to examine it's colorspace, I get the 415 error as well. I am using an ASPX page. All other files work such as tiff, jpeg, etc.
The pdf was simply an image i had saved as a pdf - there was nothing special about it. No transparency, no layers, etc. I have tried numerous PDFs all with the same result so I do not believe it is my file causing the problem. I had split out the PDF from the rest of the image processing so that I could attend to it differently, I used a Try / Catch to display the error to the browser and I got:
thanks for any assistance you can offer! Also, I am 100% positive the file exists exactly at the file path in the error wher eit says it does not.
I have installed the latest build and have the latest GhostScript installed as well. My problem is that when handling a PDF, and trying to examine it's colorspace, I get the 415 error as well. I am using an ASPX page. All other files work such as tiff, jpeg, etc.
Code: Select all
Sub doMagic(ByVal fileInfo As Object)
Dim objIm, imgPath, colorspace, xRes, yRes, dpiFlag, colorSpaceFlag
dpiFlag = 0
imgPath = fileInfo.fullName
objIm = Server.CreateObject("ImageMagickObject.MagickImage.1")
If Not objIm Is Nothing Then
If fileInfo.extension.ToLower() <> ".pdf" Then
colorspace = objIm.identify("-format", "%r", imgPath)
If colorspace <> "DirectClassRGB" Or colorspace <> "DirectClassCMYK" Or colorspace <> "PsuedoClassGray" Then
Response.Write("The colorspace of this file is not supported. Please try a different file")
End If
'Get X & Y Density, it outputs as a string "72 PixelsPerInch" - Take the left 3 place and trim and compare.
xRes = objIm.identify("-format", "%x", imgPath)
yRes = objIm.identify("-format", "%y", imgPath)
If Left(Trim(xRes), 3) < 300 Or Left(Trim(yRes), 3) < 300 Then
dpiFlag = 1
End If
Response.Write("<br/> Resolution is " & Left(Trim(xRes), 3) & "x" & Left(Trim(yRes), 3))
If dpiFlag <> 1 Then
Response.Write("<br/>DPI Passes Hi resolution check")
Else
Response.Write("<br/>The resolution is not sufficient")
End If
Else
'HERE IS WHERE THE ERROR LIES
colorspace = objIm.identify("-format", "%r", imgPath)
End If
End If
End Sub
Code: Select all
System.Runtime.InteropServices.COMException (0x80041771): identity: 415: Postscript delegate failed `c:\inetpub\wwwroot\dedupePurls\lists\DoNotWant_PeeWee_300.pdf': No such file or directory: at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) at ASP.dedupepurls_default_aspx.doMagic(Object fileInfo)