Skip to content

API reference / Quittio \ Core \ Pdf

PdfRenderer

interface in quittio/core

Quittio\Core\Pdf\PdfRenderer · Source

Turns HTML (from the template) into a PDF, embedding the invoice XML if requested.

Methods#

MethodDescription
->render()Renders the HTML of $request and returns the PDF as binary string. A renderer that supportsEmbedding() also writes the PDF/A and the embedded XML the request asks for. Throws a PdfException when rendering fails.
->supportsEmbedding()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.

render()#

public function render(RenderRequest $request): string

Renders the HTML of $request and returns the PDF as binary string. A renderer that supportsEmbedding() also writes the PDF/A and the embedded XML the request asks for. Throws a PdfException when rendering fails.

ParameterTypeDescription
$requestRenderRequest
Returns
string

supportsEmbedding()#

public function 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.

Returns
bool

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