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 clears the current sort order
Existing portfolio folder siblings are re-ordered at once under the new keys (ISO 32000-2, Table 159, /Next): folders are compared 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. Clearing the sort order returns siblings to name order