ImposePagesNUp
Page manipulation
Description
This page describes ImposePagesNUp in PDF Library for Delphi under the "Page manipulation" topic. API names, parameters, class names, filenames, and literals are kept exactly as they appear in the Delphi library and DLL entry points.
Review the syntax, parameters, and return values before calling the function.
Syntax
Delphi
Function TPDFlib.ImposePagesNUp(Columns, Rows: Integer; TargetWidth, TargetHeight: Double; Options: Integer): Integer;
Parameters
Columns and Rows set the grid (2 and 2 for four-up). TargetWidth/TargetHeight are the size of the imposed sheets in page units. Options 0 lays the pages out in reading order; 1 produces saddle-stitch booklet sheets (the grid is forced to 2 x 1, the page count is padded to a multiple of four, and sheets pair the outermost with the innermost pages so the printed stack folds into a booklet).
Return Values
Returns the number of imposed sheets created, or 0 when the document has fewer than two pages or a parameter is invalid.
Remarks
Every source page is captured as a form XObject and redrawn aspect-fit and centred inside its grid cell, so vector content stays vector. The source pages are removed from the page tree; after the call the document contains only the imposed sheets.