473,749 Members | 2,486 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Ghostscript locking files in ASP.NET

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 "ConvertFil e" method calls the Ghostscript API. At the end of the
process it calls gsapi_exit and gsapi_delete_in stance.

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:cc****** *@ancorinfo.com
Nov 17 '05 #1
1 2682
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.

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2667
by: Chris Jankowski | last post by:
Hi all, I am still fairly new to the Python community and world of Python programming. I am having some trouble changing the output directory when I call Ghostscript. Any sugguestions would be greatly appreciated. It seems to work fine, if I put the file in a directory that I am calling it from, like outputdir = './temp' or I use the "C" drive w/ outputdir = ''. All I am doing is converting a .pdf to a .tif.
1
2354
by: Adam Twardoch | last post by:
I've written a simple commanline wrapper for calling GhostScript from Python. It uses os.system under Windows and os.popen under unixes. The call looks basically like this: gs -q -dNODISPLAY -dNOPAUSE -dSAFER ps2ai.ps infile.eps >outfile.ai I'd prefer to use the GhostScript DLL API* and call it using ctypes under Windows. This way, I could package just the DLL with my application and the user would not necessarily need to install the...
1
12471
by: tc | last post by:
Does GhostScript provide any library so that we can reference it in our C# project to programmatically handle printing of ps / pdf files? I have tried to use the gs command (call by process) in C# application to handle printing. gswin32 -dPrinted -dBATCH -dNOPAUSE -q -sDEVICE=ljet4 -dFirstPage=2 -dLastPa ge=2 -dORIENT1=false -sOutputFile="YourPrinterName" FileName However, I can't control the paper orientation of the printout (I have...
15
6201
by: z. f. | last post by:
Hi, i have an ASP.NET project that is using a (Class Library Project) VB.NET DLL. for some reason after running some pages on the web server, and trying to compile the Class Library DLL, it can't compile because the DLL is in use (and the PDB too), and the w3wp.exe process is the process locking the DLL (as viewed with Sysinternals - Process Explorer). this is a huge problem. i need to do IIS reset in order to free the DLL! 1. why is...
5
3953
by: Adrian | last post by:
Is there a way to lock records and/or files in multi user application, using C#? Adrian.
2
3594
by: defcon8 | last post by:
Does a ghostscript interface for python exist? I have searched google quite a bit and all I have been able to find are command line hacks from within python. Thanks in advance for any useful help.
15
5249
by: Matt Brandt | last post by:
I am trying to get multiple threads to lock specific regions of a file. However, since each thread has the same PID, it appears that a lock by one thread does not block another thread from the same process. How does one maintain file locking between sibling threads? - Matt
3
2102
by: HugoVallejo | last post by:
Hi everyone. I've created an ASP.NET web site which uses a .NET assembly to read/write operations using an odbc driver. When a connection to the odbc database is made locking files are created, when the connection is closed those files are removed. I tried the web site using VS2005 and it worked fine. Then I published it in IIS 5.1 (WIn XP SP2) but it didn't work. I thought because write permissions on the folder of the database. So I...
18
32999
Ciary
by: Ciary | last post by:
hi all, it's my second question of today but since i'm stuck with this problem, i'm going to ask it anyway. i'm trying to convert an uploaded pdf file to a jpg, gif or png file. i want to use it as a background image. the problem isn't uploading the file, it's converting the file from pdf to an image. first, i tried to use imagick. so i installed ghostscript and imagemagick. but then the problems began. i searched 4 days to find a way to...
0
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8256
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6800
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.