Description

class Axlsx::PageMargins
Note:

The recommended way to manage page margins is via Worksheet#page_margins

PageMargins specify the margins when printing a worksheet.

For compatibility, PageMargins serialize to an empty string, unless at least one custom margin value has been specified. Otherwise, it serializes to a PageMargin element specifying all 6 margin values (using default values for margins that have not been specified explicitly).

Creates a new PageMargins object

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • left (Numeric)

    The left margin in inches

  • right (Numeric)

    The right margin in inches

  • bottom (Numeric)

    The bottom margin in inches

  • top (Numeric)

    The top margin in inches

  • header (Numeric)

    The header margin in inches

  • footer (Numeric)

    The footer margin in inches

Bottom margin (in inches)

Footer margin (in inches)

Header margin (in inches)

Left margin (in inches)

Right margin (in inches)

Set some or all margins at once.

Parameters:

  • margins (Hash)

    the margins to set (possible keys are :left, :right, :top, :bottom, :header and :footer).

Note:

For compatibility, this is a noop unless custom margins have been specified.

Serializes the page margins element

Parameters:

  • str (String) (defaults to: '')

Top margin (in inches)

PageMargins is referenced in 0 repositories