function ImportImposed(const Options: TPdfImpositionOptions; out Plan: TPdfImpositionPlan): TPdf;
function ImportImposed(const Options: TPdfImpositionOptions; out Plan: TPdfImpositionPlan; out Report: TPdfImpositionExecutionReport): TPdf;
| Options | TPdfImpositionOptions. Fields Mode, OutputWidth, OutputHeight, Columns, Rows, Duplex, ReverseSheets, Gutter, Bleed, and CreepPerSheet, with a Default class function |
| Plan | TPdfImpositionPlan. Fields SourcePageCount, PaddedPageCount, SheetCount, SideCount, SlotsPerSide, Slots, OutputWidth, OutputHeight, Columns, Rows, Gutter, and Bleed; each TPdfImpositionSlot carries SheetIndex, SideIndex, SlotIndex, SourcePageIndex, Creep, Left, Bottom, Width, and Height |
| Report | TPdfImpositionExecutionReport. Fields NativeImportCallCount, NativeImportedPageCount, UniqueSourcePageCount, BlankSlotCount, XObjectTemplateCount, FormObjectCount, ContentGenerationCallCount, OutputPageCount, and UsedNativeNUp |
| Result | TPdf. A new active document owned by the caller, or nil when native composition fails |
BuildPdfImpositionPlan validates all limits, preallocates the exact slot count, and determines every source and blank slot before document creation begins
Booklet mode pads to a multiple of four and creates front and back side order; N-up duplex mode pads incomplete physical sheets so reversing sheets never loses or reassigns source pages
Each slot records its usable Left, Bottom, Width, and Height after outer bleed, inter-cell gutter, and signed creep are applied
Zero-geometry jobs import all ordered non-blank pages through one FPDF_ImportPagesByIndex call, insert planned blanks, and use FPDF_ImportNPagesToOne as the fast path
Jobs with gutter, bleed, or creep cache one native page XObject per unique source page and create independent form objects with exact placement matrices
Both paths preserve the source document current page; the report overload exposes the execution counts needed for diagnostics and performance regression tests
The caller must free the returned document