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. |
Classes
Methods
landscape() → {Paper}
Returns the paper dimensions in landscape. If the height is greater than the width, it swaps them.
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.
Returns:
A new Paper instance in portrait orientation.
- Type
- Paper