MergeFileList

Document manipulation

Description

Merges all the files in a named file list and saves the resulting merged document to the specified file. Use the ClearFileList, FileListCount and AddToFileList functions to construct the named file list. There must be two or more files in the file list in order for the merging to succeed.

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

The ordinary merge path alternates temporary output files after the first pair of input files, avoiding an extra full copy of the growing intermediate PDF for each subsequent input. This keeps the existing return-count behaviour while reducing disk I/O on longer file lists.

Syntax

Delphi

Function TPDFlib.MergeFileList(Const ListName, OutputFileName: WideString): Integer;

ActiveX

Function PDFlib::MergeFileList(ListName As String, OutputFileName As String) As Long

DLL

int DLMergeFileList(int InstanceID, const wchar_t * ListName, const wchar_t * OutputFileName);

Parameters

ListNameThe name of the list of files to merge together The path and file name of the file to create which will contain the merged files.
OutputFileName

Return values

The number of documents which were successfully merged together. If this is less than the intended number use the FileListItem function to find the file which caused the merge process to end prematurely.