---
title: "RenderedDocument – API-Referenz · Quittio"
description: "Rendered quote, delivery note, reminder or other document (PDF and HTML, never XML)."
canonical_url: "https://quittio.dev/docs/api/Quittio/Core/Rendering/RenderedDocument"
locale: de
meta:
  "og:description": "Rendered quote, delivery note, reminder or other document (PDF and HTML, never XML)."
  "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": "RenderedDocument – 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) \\ [Core](https://quittio.dev/docs/api/Quittio/Core) \\ [Rendering](https://quittio.dev/docs/api/Quittio/Core/Rendering)

# RenderedDocument

final readonly class in quittio/core

`Quittio\Core\Rendering\RenderedDocument` · [Source](https://github.com/Quittio/quittio/blob/v0.7.1/packages/core/src/Rendering/RenderedDocument.php#L15)

Rendered quote, delivery note, reminder or other document (PDF and HTML, never XML).

## Methods \#

| Method | Description |
| --- | --- |
| `->__construct()` | |
| `->contents()` | |
| `->data()` | |
| `->filename()` | |
| `->hasPdf()` | |
| `->html()` | |
| `->mimeType()` | |
| `->notices()` | Plausibility hints on the document, in the language of the run, e.g. a reminder that claims reminder fees besides the flat rate (DocumentData::notices()). |
| `->pdf()` | |
| `->save()` | Writes the output to a file, or into a directory (an existing one or a path ending in "/") with filename(); creates missing directories. |

### `__construct()`#

```
public function __construct(
    DocumentData $data,
    string $html,
    string $filenamePattern,
    ?string $pdf = null,
    list<ValidationMessage> $notices = [],
)
```

| Parameter | Type | Description |
| --- | --- | --- |
| `$data` | `[DocumentData](https://quittio.dev/docs/api/Quittio/Core/Documents/DocumentData)` | |
| `$html` | `string` | |
| `$filenamePattern` | `string` | |
| `$pdf` | `?string` = `null` | |
| `$notices` | `list< [ValidationMessage](https://quittio.dev/docs/api/Quittio/Core/Validation/ValidationMessage)>` = `[]` | plausibility hints on the document (DocumentData::notices()) |

### `contents()`#

```
public function contents(): string
```

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

### `data()`#

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

<dl><dt>Returns</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Documents/DocumentData">DocumentData</a></code></dd>
</dl>

### `filename()`#

```
public function filename(?string $extension = null): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `$extension` | `?string` = `null` | |

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

### `hasPdf()`#

```
public function hasPdf(): bool
```

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

### `html()`#

```
public function html(): string
```

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

### `mimeType()`#

```
public function mimeType(): string
```

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

### `notices()`#

```
public function notices(): list<ValidationMessage>
```

Plausibility hints on the document, in the language of the run, e.g. a reminder that claims reminder fees besides the flat rate (DocumentData::notices()).

<dl><dt>Returns</dt>
<dd><code>list&lt;<a href="https://quittio.dev/docs/api/Quittio/Core/Validation/ValidationMessage">ValidationMessage</a>&gt;</code></dd>
</dl>

### `pdf()`#

```
public function pdf(): string
```

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

### `save()`#

```
public function save(string $path): string
```

Writes the output to a file, or into a directory (an existing one or a path ending in "/") with filename(); creates missing directories.

| Parameter | Type | Description |
| --- | --- | --- |
| `$path` | `string` | |

<dl><dt>Returns</dt>
<dd><code>string</code> – the written path</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/Core/Rendering/RenderedDocument#webpage","@type":"WebPage","description":"Rendered quote, delivery note, reminder or other document (PDF and HTML, never XML).","name":"RenderedDocument – API-Referenz","url":"https://quittio.dev/docs/api/Quittio/Core/Rendering/RenderedDocument","isPartOf":{"@id":"https://quittio.dev/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://quittio.dev/docs/api/Quittio/Core/Rendering/RenderedDocument"]}],"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"}]}
```