ValidComposeResult
Page layout, pagination, Form XObjects
Description
Private helper of TPDFlibDynamicComponentSession that validates the geometry of a component result record against the natural canvas
Syntax
Function TPDFlibDynamicComponentSession.ValidComposeResult(
Const ComposeResult: TPDFlibDynamicPageResult; AvailableWidth,
AvailableHeight: Double): Boolean;
Parameters
ComposeResult | Result record emitted by TPDFlibDynamicComponent.Compose |
|---|---|
AvailableWidth, AvailableHeight | Natural canvas dimensions that were passed to the component |
Remarks
The session applies the check after Compose returns and before any keep-together, flow-space or placement decision is made
A failing validation produces
PDF_DYNAMIC_COMPONENT_ERROR and commits neither component nor destination state
The used dimensions are checked for
NaN and infinity first, so a content result with non-finite bounds never reaches the canvas comparison
Return values
True | Both used dimensions are finite, a content result is strictly positive and within the canvas, or a no-content result reports no remaining content and zero dimensions |
|---|---|
False | Any used dimension is NaN or infinite, a content result is not positive or exceeds the canvas, or a no-content result still reports more content or non-zero dimensions |
See also
Compose, ValidFiniteRect, ComposeNextLayout, TPDFlibDynamicPageResult, TPDFlibDynamicComponentSession