Skip to main content

Module page_layout

Module page_layout 

Source
Expand description

Page layout settings for worksheets.

Provides functions for configuring page margins, page setup (paper size, orientation, scaling), header/footer, print options, and page breaks.

Structs§

PageMarginsConfig
Page margin configuration in inches.

Enums§

Orientation
Page orientation.
PaperSize
Standard paper sizes. The numeric values follow the OOXML specification.

Constants§

DEFAULT_MARGIN_BOTTOM
Default bottom margin in inches.
DEFAULT_MARGIN_FOOTER
Default footer margin in inches.
DEFAULT_MARGIN_HEADER
Default header margin in inches.
DEFAULT_MARGIN_LEFT
Default left margin in inches.
DEFAULT_MARGIN_RIGHT
Default right margin in inches.
DEFAULT_MARGIN_TOP
Default top margin in inches.

Functions§

get_fit_to_height
Get the current fit-to-height value, if set.
get_fit_to_width
Get the current fit-to-width value, if set.
get_header_footer
Get the header and footer text.
get_orientation
Get the current orientation, if set.
get_page_breaks
Get all row page break positions (1-based row numbers).
get_page_margins
Get page margins from a worksheet, returning defaults if not set.
get_paper_size
Get the current paper size, if set.
get_print_options
Get print options from a worksheet.
get_scale
Get the current scale, if set.
insert_page_break
Insert a horizontal page break before the given 1-based row number.
remove_page_break
Remove a horizontal page break at the given 1-based row number.
set_header_footer
Set header and footer text for printing.
set_page_margins
Set page margins on a worksheet.
set_page_setup
Set page setup options on a worksheet.
set_print_options
Set print options on a worksheet.