API reference › PDF/A & Conformance
pdfAddToFileList
Append a file name string to a caller-named, general-purpose
int32_t __stdcall pdfAddToFileListA(PPDF IPDF, const char* ListName, const char* FileName);
int32_t __stdcall pdfAddToFileListW(PPDF IPDF, const wchar_t* ListName, const wchar_t* FileName);
function pdfAddToFileListA(const IPDF: PPDF; ListName, FileName: PAnsiChar): Integer; stdcall;
function pdfAddToFileListW(const IPDF: PPDF; ListName, FileName: PWideChar): Integer; stdcall;
Purpose. Append a file name string to a caller-named, general-purpose string list — not the document's embedded-file/attachment table despite the name's similarity to pdfAttachFile; this is a staging mechanism (e.g. for batch operations that need to accumulate a list of file paths before processing them elsewhere).
Description. Creates the named list on first use (GetOrCreateNamedList) and appends FileName to it; the list's identity/handle persists across calls with the same ListName. The sibling pdfClearFileList (not part of this volume's list) empties a list without deleting it or affecting any actual embedded/attached file. This is a document-instance-scoped, purely in-memory string store — it has no serialization output of its own.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
ListName | The named list to append to (created if it doesn't already exist). |
FileName | The string to append — a file path/name by convention, but not validated or opened by this function. |
Return value. The list's new item count (≥ 1) on success; 0 if IPDF is invalid or ListName is empty.
C# (P/Invoke)
public static extern int pdfAddToFileListW(IntPtr IPDF, IntPtr ListName, IntPtr FileName);
public static extern int pdfAddToFileList(IntPtr IPDF, IntPtr ListName, IntPtr FileName);
public static extern int pdfAddToFileListA(IntPtr IPDF, IntPtr ListName, IntPtr FileName);
Content Creation
pdfAddToFileListW
pdfAddToFileList
pdfAddToFileListA
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.