MpdfRenderer
in package
implements
PdfRenderer
FinalYes
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.
Table of Contents
Interfaces
- PdfRenderer
- Turns HTML (from the template) into a PDF, embedding the invoice XML if requested.
Methods
- __construct() : mixed
- render() : string
- supportsEmbedding() : bool
- Whether the renderer creates the PDF/A and embeds the requested files itself (or with its own post processor). Otherwise Quittio passes the result to MpdfPostProcessor when the request asks for PDF/A or an embedded XML.
Methods
__construct()
public
__construct([string|null $tempDir = null ][, array<string, array<string, string>> $fonts = [] ][, array<int, string> $fontDirectories = [] ][, string $defaultFont = 'geist' ][, bool $pdfaAuto = false ][, bool $simpleTables = false ]) : mixed
Parameters
- $tempDir : string|null = null
- $fonts : array<string, array<string, string>> = []
-
additional fonts: family => [R => file, B => file, I => file, BI => file]
- $fontDirectories : array<int, string> = []
-
searched first, before the bundled Geist and Inter 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
render(RenderRequest $request) : string
Parameters
- $request : RenderRequest
Return values
stringsupportsEmbedding()
Whether the renderer creates the PDF/A and embeds the requested files itself (or with its own post processor). Otherwise Quittio passes the result to MpdfPostProcessor when the request asks for PDF/A or an embedded XML.
public
supportsEmbedding() : bool