ComposeNext
Page layout, pagination, Form XObjects
Description
Composes one stateful dynamic fragment into a destination page slot using the default layout policy and reports the final placement
Syntax
Function TPDFlibDynamicComponentSession.ComposeNext(Page: Integer;
Left, Top, Width, Height: Double;
Out Placement: TPDFlibDynamicPagePlacement): Integer;
Parameters
Page | Existing one-based destination page number |
|---|---|
Left, Top | Top-left destination position in current document units |
Width, Height | Finite positive destination slot size that also becomes the natural canvas size |
Placement | Emitted placement record describing the committed fragment |
Remarks
The call builds its options through CreateLayoutOptions(Width, Height) and forwards to ComposeNextLayout, so it inherits dopReject overflow handling, dhaLeft and dvaTop alignment, dppAllowSplit pagination and no flow-space minimums
The used rectangle must fit the slot, because the default overflow policy rejects rather than clips or scales
ComposeNextLayout for the full placement, retry and transform behaviour
Example
repeat
Status := Session.ComposeNext(PageNumber, 36, 36, 540, 720,
Placement);
if Status = PDF_DYNAMIC_COMPONENT_MORE then
PageNumber := PDF.NewPage;
until Status <> PDF_DYNAMIC_COMPONENT_MORE;
Return values
PDF_DYNAMIC_COMPONENT_ERROR | Input, callback, geometry, overflow or placement validation failed without committing state |
|---|---|
PDF_DYNAMIC_COMPONENT_MORE | The fragment was committed and more content remains |
PDF_DYNAMIC_COMPONENT_COMPLETE | The fragment completed the session or the session was already complete |
PDF_DYNAMIC_COMPONENT_RETRY | Pagination or flow-space policy deferred the uncommitted trial to another slot |
See also
ComposeNextLayout, CreateLayoutOptions, TPDFlibDynamicComponentSession, Compose, Completed, CompositionCount