TPDFPageSelectionBatches

Native Pascal, workflow preparation

Description

TPDFPageSelectionBatches is an array of TPDFPageSelectionBatch windows over an ordered page selection. PLBatchPageSelection divides the selection into consecutive batches without copying, sorting or deduplicating it, so every original entry belongs to exactly one batch.

Use it to feed a long page operation in bounded groups while preserving selection order, including duplicate pages and descending runs.

Syntax

Delphi

TPDFPageSelectionBatches = Array Of TPDFPageSelectionBatch;

Fields

OffsetZero-based index of the first entry of this batch in the source selection
CountNumber of entries in the batch; the last batch holds the remainder when the selection length is not a multiple of the batch size

Remarks

The returned array holds ceil(Length(Pages) / BatchSize) entries, and an empty selection yields an empty array.

BatchSize must be positive and the selection may not exceed MaxPages; violations raise EConvertError before any batch is built.

Batches carry offsets rather than page arrays, so a consumer reads the pages from the original selection.

See also

WorkflowDataTools, TPDFPageRangePages, TPDFPageSelectionAnalysis