Print Page | Close Window

DAOpenFile + DASaveAsFile + same name

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1045
Printed Date: 22 Nov 24 at 7:40PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: DAOpenFile + DASaveAsFile + same name
Posted By: ZarkoGajic
Subject: DAOpenFile + DASaveAsFile + same name
Date Posted: 26 Mar 09 at 10:56AM
Hi,
 
With the file being opened using DAOpenFile and after some changes I want to use DASaveAsFile to save the file under the original name.
 
The DASaveAsFile fails with 402 (Output file already exists and could not be deleted)
 
Yes the actual situation is that the file cannot be deleted.
 
I could save under a different name, delete original then rename the new one.
 
Question: is this the way to go or should DASaveAsFile be able to overwrite the file opened?


-------------
-zarko gajic



Replies:
Posted By: Ingo
Date Posted: 26 Mar 09 at 11:07AM
Yes. That's the way ;-)
The current process has already a handle on the file...
the complete document structure is built in memory and
you want to change the document on disk - that's not possible 'cause
strange system situations will appear.

Cheers, Ingo


Posted By: Rowan
Date Posted: 26 Mar 09 at 7:56PM
In this case it sounds like the http://www.quickpdflibrary.com/help/quickpdf/DAAppendFile.php - DAAppendFile function might be a better option. It lets you save changes directly to the original file, instead of trying to overwrite it.

Cheers,
Rowan



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk