MergeFileListStrict

Document manipulation

Description

Merges a named file list and writes the merged PDF to OutputFileName. It uses the same tagged PDF, outline, form-field, and annotation preservation path as MergeFileList.

Unlike MergeFileList, strict mode stops at the first unreadable, encrypted, corrupt, or missing input. Use it when the earlier stop-on-first-failure behaviour is required.

Syntax

Delphi

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

Parameters

ListNameNamed file list to merge. Build it with ClearFileList, AddToFileList, and FileListCount.
OutputFileNamePath and file name of the PDF to create.

Return values

The merge reports progress while scanning inputs and writing objects. Calling Abort stops the operation, closes active streams and removes incomplete output. File-list merges open each source for its scan and keep at most the first and current source readers active while writing, so handle usage remains bounded as the list grows

Return values

0The merge did not produce an output file.
Non-zeroNumber of input files merged successfully. Check ListName + "Result" with FileListItem for per-file status messages.