To support an arbitrary number of pages this layout should be done using two imposition operations with a couple of rotations in between
The workflow should first perform a Signature imposition ensuring use of the following settings:
Automatic press sheet size (without selecting any Size Options)
Signature Page Order and use of the trimbox for imposition
Note - the margins distance does not matter as the next imposition will use the PDF trimbox. This is done strictly to retain bleed content.
Odd and Even Pages are rotated in order to impose the booklet using another Signature Imposition
The workflow should the second perform a Signature imposition ensuring use of the following settings:
Press Sheet set to the final press sheet size in landscape orientation
Signature Page Order with the Define sheets per signature set to 1, use of the trimbox for imposition and Horizontal alignment set to Center
The Center alignment, will ensure the booklet pages of any dimensions are centered when the sheet is folded in half. If a fixed distance is required the Horizontal Alignment should be set to Binding Edge and a Column Gutter distance should be set for Column Gutter.
FInally, this will create a PDF that's in landscape orientation. If horizontal orientation is required then two additional rotations should be added to the workflow
The resultant workflow will impose documents of any dimensions and any number of pagesto support finishing in which the press sheets are individually folded in half and then gathered for folding and stapling into a booklet.
Note - document below is using Binding Edge alignment with a .5" gutter