Class: Paper

Paper(width, height)

Represents a paper size with width and height.

Constructor

new Paper(width, height)

Creates a new Paper instance.

Parameters:
Name Type Description
width number

The width of the paper in millimetres.

height number

The height of the paper in millimetres.

Source:

Classes

Paper

Methods

landscape() → {Paper}

Returns the paper dimensions in landscape. If the height is greater than the width, it swaps them.

Source:
Returns:

A new Paper instance in landscape orientation.

Type
Paper

portrait() → {Paper}

Returns the paper dimensions in portrait. If the height is smaller than the width, it swaps them.

Source:
Returns:

A new Paper instance in portrait orientation.

Type
Paper