MergeFilesA

Document manipulation

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to MergeFiles and string arguments are interpreted using the current SetAnsiMode code page

Merges two files on disk and saves the merged document to a new file. The files are accessed directly on disk, the entire file does not have to be loaded into memory so this function can be used with huge documents. The files must not be encrypted. Monitor the size of the output file while this function runs to work out the progress.

Outlines (bookmarks), form fields and annotations from the both documents will be present in the merged document.

Syntax

Delphi

Function DLMergeFilesA(InstanceID: Integer; FirstFileName, SecondFileName, OutputFileName: PAnsiChar): Integer;

DLL

int DLMergeFilesA(int InstanceID, const char * FirstFileName, const char * SecondFileName, const char * OutputFileName);

Parameters

FirstFileNameThe name of the first file to merge.
SecondFileNameThe name of the second file to merge.
OutputFileNameThe name of the file to create which will contain the merged document.

Return values

0The files could not be merged. Use the LastErrorCode function to determine the cause of the failure.
1The files were merged successfully and the new merged document was created