docx.page_setup
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.
| Code | Input | Output | Description |
docx.page_setup(doc, [section=], [size=], [orientation=], [margins=], [top=], [bottom=], [left=], [right=]) | doc —not documented yetsection 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 yetbottom optionalnot documented yetleft optionalnot documented yetright 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.