---
title: "RenderDocument – API-Referenz · Quittio"
description: "Renders a quote, delivery note, reminder or other document in the queue and stores it on a disk. The document travels as versioned JSON snapshot (DocumentData::toSnapshot(), brought up to date by quittio.snapshots.document_upcasters), the render options as versioned JSON. Errors that another attempt cannot fix fail the job at once; others are retried."
canonical_url: "https://quittio.dev/docs/api/Quittio/Laravel/Jobs/RenderDocument"
locale: de
meta:
  "og:description": "Renders a quote, delivery note, reminder or other document in the queue and stores it on a disk. The document travels as versioned JSON snapshot (DocumentData::toSnapshot(), brought up to date by quittio.snapshots.document_upcasters), the render options as versioned JSON. Errors that another attempt cannot fix fail the job at once; others are retried."
  "og:image": "https://quittio.dev/og/quittio-de.jpg"
  "og:image:alt": "Quittio: E-Rechnungen für PHP und Laravel. Rechtssicher, validiert, archiviert, mit geprüfter Beispielrechnung."
  "og:image:height": "630"
  "og:image:type": image/jpeg
  "og:image:width": "1200"
  "og:title": "RenderDocument – API-Referenz · Quittio"
  "twitter:image": "https://quittio.dev/og/quittio-de.jpg"
  "twitter:image:alt": "Quittio: E-Rechnungen für PHP und Laravel. Rechtssicher, validiert, archiviert, mit geprüfter Beispielrechnung."
---

> Index of every page on this site: [llms.txt](https://quittio.dev/llms.txt)

[API reference](https://quittio.dev/docs/api) / [Quittio](https://quittio.dev/docs/api/Quittio) \\ [Laravel](https://quittio.dev/docs/api/Quittio/Laravel) \\ [Jobs](https://quittio.dev/docs/api/Quittio/Laravel/Jobs)

# RenderDocument

final class in quittio/laravel · implements `Illuminate\Contracts\Queue\ShouldQueue` · uses `Illuminate\Queue\InteractsWithQueue`, `Illuminate\Bus\Queueable`

`Quittio\Laravel\Jobs\RenderDocument` · [Source](https://github.com/Quittio/quittio/blob/v0.7.1/packages/laravel/src/Laravel/Jobs/RenderDocument.php#L32)

Renders a quote, delivery note, reminder or other document in the queue and stores it on a disk. The document travels as versioned JSON snapshot (DocumentData::toSnapshot(), brought up to date by quittio.snapshots.document\_upcasters), the render options as versioned JSON. Errors that another attempt cannot fix fail the job at once; others are retried.

## Constants \#

| Constant | Value | Description |
| --- | --- | --- |
| `PERMANENT_ERRORS` | `[\Quittio\Core\Calculation\CalculationException::class, \Quittio\Core\Exceptions\ConfigurationException::class, \Quittio\Core\Exceptions\HydrationException::cla …` | Exceptions that fail the job without a further attempt. |

## Properties \#

| Property | Type | Description |
| --- | --- | --- |
| `$backoff` | `list<int>` | |
| `$disk` readonly | `?string` | |
| `$document` readonly | `string` | JSON of DocumentData::toSnapshot() |
| `$options` readonly | `string` | JSON of RenderOptions::toArray() |
| `$path` readonly | `?string` | |
| `$tries` | `int` | |

## Methods \#

| Method | Description |
| --- | --- |
| `->__construct()` | |
| `->data()` | The document of the job, upcast with the document upcasters of the application. |
| `->failed()` | Called by the queue worker when the job failed for good. |
| `->handle()` | Renders the document with the events of a render run, stores it and dispatches QueuedDocumentStored. |
| `->middleware()` | |
| `::of()` | The job of a document and its render options. |
| `->renderOptions()` | The render options of the job. |

### `__construct()`#

```
public function __construct(
    string $document,
    string $options,
    ?string $disk = null,
    ?string $path = null,
)
```

| Parameter | Type | Description |
| --- | --- | --- |
| `$document` | `string` | JSON of DocumentData::toSnapshot() |
| `$options` | `string` | JSON of RenderOptions::toArray() |
| `$disk` | `?string` = `null` | |
| `$path` | `?string` = `null` | |

### `data()`#

```
public function data(): DocumentData
```

The document of the job, upcast with the document upcasters of the application.

<dl><dt>Returns</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Documents/DocumentData">DocumentData</a></code></dd>
<dt>Throws</dt>
<dd><code>JsonException| <a href="https://quittio.dev/docs/api/Quittio/Core/Exceptions/HydrationException">HydrationException</a>| <a href="https://quittio.dev/docs/api/Quittio/Core/Serialization/Snapshots/SnapshotVersionException">SnapshotVersionException</a></code> – for a payload that cannot be read</dd></dl>

### `failed()`#

```
public function failed(Throwable $exception): void
```

Called by the queue worker when the job failed for good.

| Parameter | Type | Description |
| --- | --- | --- |
| `$exception` | `Throwable` | |

### `handle()`#

```
public function handle(QuittioManager $quittio): void
```

Renders the document with the events of a render run, stores it and dispatches QueuedDocumentStored.

| Parameter | Type | Description |
| --- | --- | --- |
| `$quittio` | `[QuittioManager](https://quittio.dev/docs/api/Quittio/Laravel/QuittioManager)` | |

### `middleware()`#

```
public function middleware(): list<object>
```

<dl><dt>Returns</dt>
<dd><code>list&lt;object&gt;</code></dd>
</dl>

### `of()`#

```
public static function of(
    DocumentData $document,
    RenderOptions $options,
    ?string $disk = null,
    ?string $path = null,
): self
```

static

The job of a document and its render options.

| Parameter | Type | Description |
| --- | --- | --- |
| `$document` | `[DocumentData](https://quittio.dev/docs/api/Quittio/Core/Documents/DocumentData)` | |
| `$options` | `[RenderOptions](https://quittio.dev/docs/api/Quittio/Core/Rendering/RenderOptions)` | |
| `$disk` | `?string` = `null` | |
| `$path` | `?string` = `null` | |

<dl><dt>Returns</dt>
<dd><code>self</code></dd>
</dl>

### `renderOptions()`#

```
public function renderOptions(): RenderOptions
```

The render options of the job.

<dl><dt>Returns</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Rendering/RenderOptions">RenderOptions</a></code></dd>
<dt>Throws</dt>
<dd><code>JsonException</code> – for a payload that cannot be read</dd></dl>

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://quittio.dev/#website","@type":"WebSite","description":"E-Rechnungen für PHP und Laravel: ZUGFeRD, XRechnung und Peppol erstellen, prüfen, lesen und archivieren.","inLanguage":"de-DE","name":"Quittio","url":"https://quittio.dev/","publisher":{"@id":"https://quittio.dev/#identity"},"workTranslation":{"@id":"https://quittio.dev/en#website"}},{"@id":"https://quittio.dev/docs/api/Quittio/Laravel/Jobs/RenderDocument#webpage","@type":"WebPage","description":"Renders a quote, delivery note, reminder or other document in the queue and stores it on a disk. The document travels as versioned JSON snapshot (DocumentData::toSnapshot(), brought up to date by quittio.snapshots.document_upcasters), the render options as versioned JSON. Errors that another attempt cannot fix fail the job at once; others are retried.","name":"RenderDocument – API-Referenz","url":"https://quittio.dev/docs/api/Quittio/Laravel/Jobs/RenderDocument","isPartOf":{"@id":"https://quittio.dev/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://quittio.dev/docs/api/Quittio/Laravel/Jobs/RenderDocument"]}],"primaryImageOfPage":{"@id":"https://quittio.dev/#logo"}},{"@id":"https://quittio.dev/#identity","@type":"Organization","description":"Open-Source-Bibliothek für E-Rechnungen in PHP und Laravel (ZUGFeRD, XRechnung, Peppol) und Quittio Managed.","email":"kontakt@niklasforst.de","legalName":"Niklas Forst – Softwareentwicklung","name":"Quittio","url":"https://quittio.dev","founder":{"@type":"Person","name":"Niklas Forst","url":"https://quittio.dev/ueber"},"logo":{"@id":"https://quittio.dev/#logo"},"sameAs":["https://github.com/Quittio/quittio","https://packagist.org/packages/quittio/quittio"]},{"@id":"https://quittio.dev/#logo","@type":"ImageObject","caption":"Quittio","contentUrl":"https://quittio.dev/logo.png","inLanguage":"de-DE","url":"https://quittio.dev/logo.png"}]}
```