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)