Ghostscript locking files in ASP.NET

  • Thread starter Thread starter Christopher Campbell
  • Start date Start date
C

Christopher Campbell

I am calling Ghostscript 8.00 from and ASP.NET application (VB) to create
..JPG thumbnails of .PDF files. I have created a class module for
Ghostscript and I am creating an instance of the class to act on. I pass
the class the name of the PDF file, the name of the JPG file that I want it
to create, and a resolution factor to control resizing.

This all works great. However, when Ghostscript finishes, it seems to
maintain a lock on the output file. The problem is, if the user tries to
overlay the file and create a new thumbnail, Ghostscript can't overlay the
thumbail file and the original image is left on the server.

My process looks something like this:

Dim GS as GhostScript ' GhostScript is my new class.
Dim gsReturn as boolean

GS = New GhostScript

gsReturn = GS.ConvertFile(inputfile, outputfile)

GS = Nothing

The "ConvertFile" method calls the Ghostscript API. At the end of the
process it calls gsapi_exit and gsapi_delete_instance.

Can anyone think of a reason that the lock on the output file would be held
or a way for me to force that lock to be released?

Thanks for any help you can offer.

Christopher Campbell
mailto:[email protected]
 
Hi Christopher,

I have done some research regarding this issue but have not found a
specific idea. I am not familiar with the Ghostscript.

Personally I think that you can contact Ghostscript for help. They can
provide more information regarding this issue. Thank you for your
understanding.

http://www.ghostscript.com
"...
Welcome to www.ghostscript.com, the news and community site for
Ghostscript.
..."

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top