TPDFPageSelectionOperation

Native Pascal, workflow preparation

Description

TPDFPageSelectionOperation selects how PLCombinePageSelections merges two ordered page selections. The result is always expressed in terms of the left selection's order, with union appending right-only pages in right order.

Every result is deduplicated, so the operation behaves like a set operation on page numbers while keeping a deterministic output order.

Syntax

Delphi

TPDFPageSelectionOperation = (psoUnion, psoIntersection, psoDifference);

Values

psoUnionKeep every distinct left page in left order, then append the right pages not already present, in right order
psoIntersectionKeep the left pages that also occur in the right selection, in left order, deduplicated
psoDifferenceKeep the left pages that do not occur in the right selection, in left order, deduplicated

Remarks

Membership is decided by page number only; input order affects the output order but not the membership decision.

Duplicates in either input never produce duplicate output pages.

PLCombinePageSelections validates both inputs and raises EConvertError for non-positive pages or a result above MaxPages; a value outside this enum is rejected the same way.

See also

WorkflowDataTools, TPDFPageRangePages, TPDFPageSelectionAnalysis