Qu

docx.page_setup

Builtin index · File I/O

docx.page_setup(doc, [section=], [size=], [orientation=], [margins=], [top=], [bottom=], [left=], [right=])

Input: doc, section, size, orientation, margins, top, bottom, left, right · Output: no output

What it is

Changes page size ("A4", "A3", "A5", "B5", "Letter", "Legal", or [width, height]), orientation ("portrait"/"landscape", which swaps width and height) and margins (millimetres or lengths; margins sets all four, the others override it) -- of section section (0-based), or of every section when omitted. *Added in v0.4.5*

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
docx.page_setup(doc, [section=], [size=], [orientation=], [margins=], [top=], [bottom=], [left=], [right=])
doc —not documented yet
section optionalmargins sets all four, the others override it) -- of section section (0-based), or of every section when omitted.
size optionalChanges page size ("A4", "A3", "A5", "B5", "Letter", "Legal", or [width, height]), orientation ("portrait"/"landscape", which swaps width and height) and margins (millimetres or lengths.
orientation optionalChanges page size ("A4", "A3", "A5", "B5", "Letter", "Legal", or [width, height]), orientation ("portrait"/"landscape", which swaps width and height) and margins (millimetres or lengths.
margins optionalmargins sets all four, the others override it) -- of section section (0-based), or of every section when omitted.
top optionalnot documented yet
bottom optionalnot documented yet
left optionalnot documented yet
right optionalnot documented yet
not documented yet*Added in v0.4.5*.

Examples

No documentation example calls this form yet. The File I/O chapter is where one belongs.