DASaveAsFile

Document management, Direct access functionality

Description

Rewrites the entire file, including all changes, to a new file. This operation may take some time with large files or files with many objects. The original file is closed after this operation and the file handle will no longer be valid. The original file cannot be overwritten. Use DAAppendFile if you want to append changes to original file.

Syntax

Delphi

function TPDFlib.DASaveAsFile(FileHandle: Integer; Const OutputFileName: WideString): Integer;

ActiveX

Function PDFlib::DASaveAsFile(FileHandle As Long, OutputFileName As String) As Long

DLL

int DLDASaveAsFile(int InstanceID, int FileHandle, wchar_t * OutputFileName);

Parameters

FileHandleA handle returned by the DAOpenFile, DAOpenFileReadOnly or DAOpenFromStream functions
OutputFileNameThe path and name of the new document to create.

Return values

0The new file could not be created
1The document was saved to the new file successfully