Documentation

SizeConverter
in package
implements LoggerAwareInterface uses PsrLogAwareTrait

Table of Contents

Interfaces

LoggerAwareInterface
Describes a logger-aware instance.

Properties

$logger  : LoggerInterface
$defaultFontSize  : mixed
$dpi  : mixed
$mpdf  : Mpdf

Methods

__construct()  : mixed
convert()  : float
Depends of maxsize value to make % work properly. Usually maxsize == pagewidth For text $maxsize = $fontsize Setting e.g. margin % will use maxsize (pagewidth) and em will use fontsize
setLogger()  : void
multiplyFontSize()  : mixed

Properties

Methods

convert()

Depends of maxsize value to make % work properly. Usually maxsize == pagewidth For text $maxsize = $fontsize Setting e.g. margin % will use maxsize (pagewidth) and em will use fontsize

public convert([mixed $size = 5 ][, mixed $maxsize = 0 ][, mixed $fontsize = false ][, mixed $usefontsize = true ]) : float
Parameters
$size : mixed = 5
$maxsize : mixed = 0
$fontsize : mixed = false
$usefontsize : mixed = true

Set false for e.g. margins - will ignore fontsize for % values

Return values
float

Final size in mm

multiplyFontSize()

private multiplyFontSize(mixed $fontsize, mixed $maxsize, mixed $ratio) : mixed
Parameters
$fontsize : mixed
$maxsize : mixed
$ratio : mixed

        
On this page

Search results