pdfCreateColItemDate
Attach one collection-schema field value (date, number, or
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);
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.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
EmbFile | Handle of an existing embedded file (from pdfAttachFile — Embedded Files & Attachments). |
Key | The collection schema field key — always ANSI, even for pdfCreateColItemStringW. |
Date/Value | The field's value, typed per variant. |
Prefix | A display prefix string for this value. |
Return value. True if EmbFile resolves and the item was recorded; False otherwise.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Object Creation
pdfCreateColItemDate
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.