Page 1 of 1

SDK / GFLAx Documentation

Posted: Fri Feb 10, 2006 2:34 pm
by airyt
Hello,

XnView / GFLAx is exactly what i'm looking for... i want to be able to upload an eps file to my webserver and have asp convert the eps to a jpg thumbnail so i can send a thumbnailed file listing to the user's browser.

The pages all say that GFLAx will do the trick, but i can't find any documentation on how to use the COM object. i've searched the forums a few times, but there doesn't seem to be any object reference material.

Any help yould be greatly appreciated!

Thx,
airyt

Can't load EPS file

Posted: Fri Feb 10, 2006 3:58 pm
by airyt
Hello, So i've done lots and lots of searching...

I have downloaded and installed:
AFPL Ghostscript (8.53) from http://www.cs.wisc.edu/~ghost/doc/AFPL/
I have downloaded and installed:
GflAX DLL 2.23- GFL 2.40 (Standard)
I am running Windows 2000 Server w/ IIS v5 and ASP v3.0

I am trying to read an EPS file and convert it to a JPG thumbnail. I continually get the following error:

Code: Select all

GflAx.GflAx.1 error '80004005' 

Error to open file 

/temp.asp, line 22 
from the following code:

Code: Select all

Dim oImage
Set oImage = Server.CreateObject("GflAx.GflAx") 
strSourcePath = Server.MapPath( "images/sy.eps" )
strTargetPath = Server.MapPath( "images/sy.jpg" )
' Response.Write( "Convert " & strSourcePath & " -> " & strTargetPath & "<p>" )
With oImage
    .epsWidth  = 3000 
    .epsHeight = 3000 
    .epsDpi    = 60       
    .EnableLZW = True 

    .LoadBitmap strSourcePath
    .SaveFormatName = "jpeg" 
    .SaveBitmap strTargetPath
end with 
Set oImage = Nothing 
Can you please help? I have restarted the computer many times. Rebooting does not fix the error.

Is there any other way of testing whether or not the GFLAx object is interfacing with GhostScript properly?
Is there a well-known version of GFLAx and/or GhostScript to accomplish this task?

Thanks in advance!
airyt

Re: Can't load EPS file

Posted: Fri Feb 17, 2006 10:57 am
by xnview
airyt wrote:Hello, So i've done lots and lots of searching...

I have downloaded and installed:
AFPL Ghostscript (8.53) from http://www.cs.wisc.edu/~ghost/doc/AFPL/
I have downloaded and installed:
GflAX DLL 2.23- GFL 2.40 (Standard)
I am running Windows 2000 Server w/ IIS v5 and ASP v3.0

I am trying to read an EPS file and convert it to a JPG thumbnail. I continually get the following error:

Code: Select all

GflAx.GflAx.1 error '80004005' 

Error to open file 

/temp.asp, line 22 
from the following code:

Code: Select all

Dim oImage
Set oImage = Server.CreateObject("GflAx.GflAx") 
strSourcePath = Server.MapPath( "images/sy.eps" )
strTargetPath = Server.MapPath( "images/sy.jpg" )
' Response.Write( "Convert " & strSourcePath & " -> " & strTargetPath & "<p>" )
With oImage
    .epsWidth  = 3000 
    .epsHeight = 3000 
    .epsDpi    = 60       
    .EnableLZW = True 

    .LoadBitmap strSourcePath
    .SaveFormatName = "jpeg" 
    .SaveBitmap strTargetPath
end with 
Set oImage = Nothing 
Can you please help? I have restarted the computer many times. Rebooting does not fix the error.

Is there any other way of testing whether or not the GFLAx object is interfacing with GhostScript properly?
Is there a well-known version of GFLAx and/or GhostScript to accomplish this task?

Thanks in advance!
airyt
Do you open your eps file with XnView?

Re: Can't load EPS file

Posted: Thu Mar 16, 2006 4:48 pm
by Guest
xnview wrote:Do you open your eps file with XnView?
Yes. No problems there apparently. Although one of the AI files looks funny.

Note: i have tried successfully to get this to work with other file formats (jpg, gif).

Is there a certain directory that GS must be installed in?

Posted: Thu Mar 16, 2006 5:00 pm
by Guest
More on this:

I ran a file registry & file monitor on my machine while i loaded up the asp page:

it's looking for a file that doesn't exist (nor does the path):
C:\Windows\System32\Plugins\IlmIlf.dll

does that have anything to do with it?

Posted: Thu Mar 16, 2006 5:03 pm
by Guest
Anonymous wrote:C:\Windows\System32\Plugins\IlmIlf.dll
Sorry - this should be
C:\Windows\System32\Plugins\IlmImf.dll

Posted: Thu Mar 16, 2006 6:04 pm
by Guest
I found out what the error is...

You MUST allow the IUSR_<machinename> account to have read & write access on
%SystemDir%\Temp\

It appear the GS will create a temp file in this directory when doing it's thing (as the internet user) and if there is no write permissions, this function will fail, thereby screwing up the conversion.

So for me, i simply gave IUSR_<machinename> full control over C:\WINNT\Temp\

Hope this helps someone else!!