PageSetup
Overview
PageSetup is a class in Aspose.Words for Python.
Inherits from: BaseModel.
PageSetup properties such as paper_size, orientation, margins, and header/footer distances let developers configure page layout for PDF generation.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
paper_size | int | Read | Represents the size of the paper for the section, e.g., A4 or Letter |
orientation | int | Read | Integer indicating portrait (0) or landscape (1) page orientation |
top_margin | float | Read | Specifies the distance from the top edge to the page content |
bottom_margin | float | Read | Specifies the distance from the bottom edge to the page content |
left_margin | float | Read | Specifies the distance from the left edge to the page content |
right_margin | float | Read | Specifies the distance from the right edge to the page content |
header_distance | float | Read | Defines the space between the header and the top of the page body |
footer_distance | float | Read | Defines the space between the footer and the bottom of the page body |
page_width | float | Read | Float representing the total width of the page in points |
page_height | float | Read | Float representing the total height of the page in points |
page_number_style | int | Read | Integer indicating the numbering format (e.g., Arabic, Roman) |
page_starting_number | int | Read | Integer setting the first page number of the section |
restart_page_numbering | bool | Read | Gets or sets whether numbering restarts at the section start |
section_start | int | Read | Integer defining how the section begins (new page, column, etc.) |
different_first_page_header_footer | bool | Read | Gets or sets a flag for distinct first-page headers/footers |
odd_and_even_pages_header_footer | bool | Read | Gets or sets a flag for separate odd/even page headers/footers |