THotPDF.SetPortfolioSortOrder Method

procedure SetPortfolioSortOrder(
  const SortKeys: array of THPDFPortfolioSortKey);

Writes a scalar collection sort entry for one key or parallel key and direction arrays for multiple keys

Each key must be a non-empty PDF Name formed from letters, digits, underscore, hyphen, or full stop

An empty array removes the current sort order

Existing portfolio folder siblings are reordered immediately under the new keys (ISO 32000-2 Table 159 /Next): folders compare by the schema fields of their /CI metadata, numbers numerically and text with full UAX #21 case folding, folders missing a value sort last, and ties fall back to the case-folded folder name. Removing the sort order returns siblings to name order