API reference / Quittio \ Core \ Pdf \ Renderers
MpdfRenderer
final class in quittio/core · implements PdfRenderer
Quittio\Core\Pdf\Renderers\MpdfRenderer · Source
Default renderer: HTML/CSS to PDF/A-3b with mPDF, in pure PHP.
PDF/A, the embedded XML and the XMP metadata are written in one pass.
Methods#
| Method | Description |
|---|---|
->__construct() | |
->render() | |
->supportsEmbedding() |
__construct()#
public function __construct(
?string $tempDir = null,
array<string, array<string, string>> $fonts = [],
list<string> $fontDirectories = [],
string $defaultFont = 'geist',
bool $pdfaAuto = false,
bool $simpleTables = false,
)| Parameter | Type | Description |
|---|---|---|
$tempDir | ?string = null | |
$fonts | array<string, array<string, string>> = [] | additional fonts: family => [R => file, B => file, I => file, BI => file] |
$fontDirectories | list<string> = [] | searched first, before the bundled Geist, Inter and Liberation Sans and the fonts of mPDF, so that files with the same name (e.g. a published and edited Inter) replace them |
$defaultFont | string = 'geist' | |
$pdfaAuto | bool = false | |
$simpleTables | bool = false |
render()#
public function render(RenderRequest $request): string| Parameter | Type | Description |
|---|---|---|
$request | RenderRequest |
- Returns
string
supportsEmbedding()#
public function supportsEmbedding(): bool- Returns
bool