BOOL32 __stdcall pdfSetColSortField(PPDF IPDF, uint32_t ColField, BOOL32 AscendingOrder);
function pdfSetColSortField(const IPDF: PPDF; ColField: Cardinal; AscendingOrder: LongBool): LongBool; stdcall;
Purpose. Choose which portable-collection (PDF Package/Portfolio) schema column the collection's initial sort should use, and its direction.
Description. Requires a collection schema to already exist (FColCreated; established via the collection-field/schema creation path) and ColField to be a valid 1-based column index within FColFCount. Stores ColField/AscendingOrder into FColSortField/ FColSortAsc; these are read back only indirectly, by GetCollectionInfoH, which resolves FColSortField to the actual column key name (FColFKey[FColSortField - 1]) for the /D (default sort) entry of the collection's /CO (Collection) dictionary at serialization.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
ColField | 1-based column index into the collection schema (not 0-based like most other index parameters in this SDK). |
AscendingOrder | Sort direction. |
Return value. True if a collection schema exists and ColField is in range 1..FColFCount; False otherwise (including when no collection has been created at all via pdfCreateCollectionField, Field Creation).
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Setters
pdfSetColSortField
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.