API referenceCore SDK

pdfCreateColItemString

Attach one collection-schema field value (date, number, or

C
BOOL32 __stdcall pdfCreateColItemDate(PPDF IPDF, uint32_t EmbFile, const char* Key, LongInt Date, const char* Prefix);
BOOL32 __stdcall pdfCreateColItemNumber(PPDF IPDF, uint32_t EmbFile, const char* Key, double Value, const char* Prefix);
BOOL32 __stdcall pdfCreateColItemStringA(PPDF IPDF, uint32_t EmbFile, const char* Key, const char* Value, const char* Prefix);
BOOL32 __stdcall pdfCreateColItemStringW(PPDF IPDF, uint32_t EmbFile, const char* Key, const wchar_t* Value, const wchar_t* Prefix);
Delphi
function pdfCreateColItemDate(const IPDF: PPDF; EmbFile: Cardinal; const Key: PAnsiChar; Date: LongInt; const Prefix: PAnsiChar): LongBool; stdcall;
function pdfCreateColItemNumber(const IPDF: PPDF; EmbFile: Cardinal; const Key: PAnsiChar; Value: Double; const Prefix: PAnsiChar): LongBool; stdcall;
function pdfCreateColItemStringA(const IPDF: PPDF; EmbFile: Cardinal; const Key: PAnsiChar; const Value: PAnsiChar; const Prefix: PAnsiChar): LongBool; stdcall;
function pdfCreateColItemStringW(const IPDF: PPDF; EmbFile: Cardinal; const Key: PAnsiChar; const Value: PWideChar; const Prefix: PWideChar): LongBool; stdcall;

Purpose. Attach one collection-schema field value (date, number, or string) to an embedded file, for display in a PDF Portfolio's browsable table — one call per (EmbFile, Key) pair.

Description. All three route through the same CreateColItemH internal helper, discriminated by an IsDate/value-kind flag pair (the date/number forms both pass IsDate := True with different payload slots, per the underlying signature; the string forms pass IsDate := False). Note pdfCreateColItemStringW's asymmetric signature: its Key parameter remains const char* (ANSI) even in the W variant — only Value and Prefix are wide — the field's schema *key name* is always ANSI-only across both entry points.

Parameters.

ParameterDescription
IPDFDocument handle.
EmbFileHandle of an existing embedded file (from pdfAttachFile — Embedded Files & Attachments).
KeyThe collection schema field key — always ANSI, even for pdfCreateColItemStringW.
Date/ValueThe field's value, typed per variant.
PrefixA display prefix string for this value.

Return value. True if EmbFile resolves and the item was recorded; False otherwise.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Core SDK
Category

Object Creation

Exported names

pdfCreateColItemStringA pdfCreateColItemStringW

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.