CreateLayoutOptions
Page layout, pagination, Form XObjects
Description
Builds a fully populated TPDFlibDynamicLayoutOptions record for ComposeNextLayout with defaults matching plain ComposeNext behaviour
Syntax
Class Function TPDFlibDynamicComponentSession.CreateLayoutOptions(
ContentWidth, ContentHeight: Double;
OverflowPolicy: TPDFlibDynamicOverflowPolicy = dopReject;
HorizontalAlignment: TPDFlibDynamicHorizontalAlignment = dhaLeft;
VerticalAlignment: TPDFlibDynamicVerticalAlignment = dvaTop;
PaginationPolicy: TPDFlibDynamicPaginationPolicy = dppAllowSplit;
MinimumSlotHeight: Double = 0;
MinimumFollowingHeight: Double = 0):
TPDFlibDynamicLayoutOptions; Static;
Parameters
ContentWidth, ContentHeight | Finite positive natural canvas passed to the component through AvailableWidth and AvailableHeight |
|---|---|
OverflowPolicy | dopReject, dopClip or dopScaleDown |
HorizontalAlignment | dhaLeft, dhaCenter or dhaRight |
VerticalAlignment | dvaTop, dvaCenter or dvaBottom |
PaginationPolicy | dppAllowSplit, dppKeepTogether or dppRequireComplete |
MinimumSlotHeight | Non-negative slot height required before component cloning and composition start |
MinimumFollowingHeight | Non-negative height reserved after a final resolved fragment for a following component |
Remarks
The helper assigns every record field from its arguments and performs no validation itself; ComposeNextLayout checks finiteness, positivity and enum ranges before any component work starts
As a static class function it can be called without a session instance
ComposeNext derives its default options from CreateLayoutOptions(Width, Height)
Example
Options := TPDFlibDynamicComponentSession.CreateLayoutOptions(
640, 360, dopScaleDown, dhaLeft, dvaTop, dppAllowSplit, 72, 24);
Status := Session.ComposeNextLayout(
PageNumber, 36, 72, 540, 240, Options, Placement);
Return values
TPDFlibDynamicLayoutOptions | Record populated with the supplied natural canvas, overflow, alignment, pagination and flow-space settings, ready for ComposeNextLayout |
|---|
See also
ComposeNextLayout, ComposeNext, TPDFlibDynamicComponentSession, KeepTogetherRetryPending, LastRetryReason