Skip to content

API reference / Quittio \ Core \ View

LetterLayout

final readonly class in quittio/core

Quittio\Core\View\LetterLayout · Source

Position of the address field and marks on the first page, in millimetres from the top left corner (e.g. DIN 5008 form A/B in the German country pack).

Properties#

PropertyTypeDescription
$addressHeight readonlyfloat
$addressLeft readonlyfloat
$addressTop readonlyfloat
$addressWidth readonlyfloat
$addressZoneTop readonlyfloatstart of the recipient address within the address field (DIN 5008: below the 17.7 mm "Zusatz- und Vermerkzone", whose last line holds the sender line)
$foldMarks readonlylist<float>distances of fold marks from the top edge
$name readonlystring
$punchMark readonly?float
$senderLineHeight readonlyfloat

Methods#

MethodDescription
->__construct()
::free()Layout without norm: address field where the default template places it.
->letterheadHeight()Height of the letterhead above the address field for a given top page margin.

__construct()#

public function __construct(
    string $name,
    float $addressTop = 45.0,
    float $addressLeft = 20.0,
    float $addressWidth = 85.0,
    float $addressHeight = 45.0,
    float $senderLineHeight = 5.0,
    list<float> $foldMarks = [],
    ?float $punchMark = null,
    float $addressZoneTop = 17.7,
)
ParameterTypeDescription
$namestring
$addressTopfloat = 45.0
$addressLeftfloat = 20.0
$addressWidthfloat = 85.0
$addressHeightfloat = 45.0
$senderLineHeightfloat = 5.0
$foldMarkslist<float> = []distances of fold marks from the top edge
$punchMark?float = null
$addressZoneTopfloat = 17.7start of the recipient address within the address field (DIN 5008: below the 17.7 mm "Zusatz- und Vermerkzone", whose last line holds the sender line)

free()#

public static function free(): self

static

Layout without norm: address field where the default template places it.

Returns
self

letterheadHeight()#

public function letterheadHeight(float $pageMarginTop): float

Height of the letterhead above the address field for a given top page margin.

ParameterTypeDescription
$pageMarginTopfloat
Returns
float

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.