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

ComposeResultResult record emitted by TPDFlibDynamicComponent.Compose
AvailableWidth, AvailableHeightNatural 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

TrueBoth 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
FalseAny 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