Skip to content

LiquidPDF

German reference letter (Arbeitszeugnis) from Markdown

A text document rather than a table: the paragraphs arrive as Markdown, markdown turns them into HTML with lists and emphasis, and the template sets a serif face, justified text with hyphenation and a signature block for two signers that stays together on one page.

Free plan, no card. You get your own copy in the editor, published and ready for the API.

Rendered result

Rendered result: German reference letter (Arbeitszeugnis) from Markdown
PDF · 1 page · 76 KB ↓ download

What this example shows

  • Each entry of reference.sections is Markdown; markdown renders paragraphs, the list of duties and the emphasis, so the text can come straight from an HR tool.
  • date: "d. MMMM yyyy" with the locale de-DE writes 12. April 1990 and 30. September 2026.
  • hyphens: auto with text-align: justify gives even lines; Chromium hyphenates German because the document language follows the locale.
  • The serif face loads from Google Fonts in head.html; nothing has to be installed anywhere.
  • The place, date and both signature lines sit in one block with break-inside: avoid.

Helpers used

Template folder

templates/arbeitszeugnis/template.htmlLiquid
<header>
  <p class="company">{{ company.name | upper }}</p>
  <p class="muted">{{ company.street }} · {{ company.city }}</p>
</header>

<h1>{{ reference.kind }}</h1>

<p>
  {{ employee.salutation }} {{ employee.name }}, geboren am {{ employee.born | date: "d. MMMM yyyy" }},
  war vom {{ employee.from | date: "d. MMMM yyyy" }} bis zum {{ employee.until | date: "d. MMMM yyyy" }}
  als {{ employee.role }} in unserem Unternehmen tätig.
</p>

{% for section in reference.sections %}
<section>{{ section | markdown }}</section>
{% endfor %}

<footer>
  <p>{{ reference.place }}, {{ employee.until | date: "d. MMMM yyyy" }}</p>
  <div class="signatures">
    {% for signer in reference.signers %}
    <div><span></span>{{ signer.name }}<br><small>{{ signer.role }}</small></div>
    {% endfor %}
  </div>
</footer>
templates/arbeitszeugnis/style.cssCSS
body { font-family: 'Source Serif 4', serif; font-size: 11pt; line-height: 1.6; color: #111827; }
header { padding-bottom: 5mm; border-bottom: 1px solid #9ca3af; }
.company { margin: 0; font-size: 12pt; font-weight: 600; letter-spacing: 0.12em; }
.muted { margin: 1mm 0 0; font-size: 9pt; color: #6b7280; }
h1 { margin: 16mm 0 8mm; font-size: 18pt; font-weight: 600; text-align: center; }
p { margin: 0 0 4mm; text-align: justify; hyphens: auto; }
section ul { margin: 0 0 4mm; padding-left: 6mm; }
footer { margin-top: 12mm; break-inside: avoid; }
.signatures { display: flex; gap: 14mm; margin-top: 16mm; }
.signatures div { flex: 1; font-size: 10pt; }
.signatures span { display: block; margin-bottom: 2mm; border-top: 1px solid #111827; }
small { color: #6b7280; }
templates/arbeitszeugnis/head.htmlHTML
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@400;600&display=swap">
templates/arbeitszeugnis/settings.jsonJSON
{
  "pdf": {
    "metadata": {
      "title": "{{ reference.kind }}"
    }
  },
  "paper": {
    "format": "A4"
  },
  "margin": {
    "top": "28mm",
    "right": "25mm",
    "bottom": "25mm",
    "left": "25mm"
  },
  "locale": "de-DE",
  "timezone": "Europe/Berlin"
}
templates/arbeitszeugnis/data/default.jsonJSON
{
  "company": {
    "name": "Fennlor Studio GmbH",
    "street": "Musterstraße 1",
    "city": "12345 Musterstadt",
    "phone": "+49 000 0000000",
    "email": "hallo@fennlor.example",
    "iban": "DE36000000000000000000",
    "bic": "XXXXDEXXXXX",
    "vat_id": "DE000000000",
    "register": "Amtsgericht Musterstadt, HRB 00000",
    "director": "Erika Mustermann"
  },
  "employee": {
    "salutation": "Frau",
    "name": "Erika Mustermann",
    "born": "1990-04-12",
    "from": "2021-03-01",
    "until": "2026-09-30",
    "role": "Senior Software Engineer"
  },
  "reference": {
    "kind": "Arbeitszeugnis",
    "place": "Musterstadt",
    "signers": [
      {
        "name": "Max Mustermann",
        "role": "Geschäftsführung"
      },
      {
        "name": "Jane Doe",
        "role": "Leitung Entwicklung"
      }
    ],
    "sections": [
      "Die Fennlor Studio GmbH entwickelt Software für die Dokumentenerstellung. Zu den Aufgaben von Frau Mustermann gehörten:\n\n- Konzeption und Umsetzung der Rendering-Pipeline\n- fachliche Führung eines Teams von vier Entwicklerinnen und Entwicklern\n- Abstimmung mit Kunden in technischen Fragen",
      "Frau Mustermann verfügt über ein **umfassendes und fundiertes Fachwissen**, das sie stets sicher und erfolgreich in der Praxis einsetzte. Sie arbeitete jederzeit selbstständig, sorgfältig und zielorientiert und erledigte ihre Aufgaben stets zu unserer vollsten Zufriedenheit.",
      "Ihr Verhalten gegenüber Vorgesetzten, Kolleginnen, Kollegen und Kunden war jederzeit vorbildlich.",
      "Frau Mustermann verlässt unser Unternehmen auf eigenen Wunsch. Wir bedauern ihre Entscheidung, danken ihr für die stets sehr gute Zusammenarbeit und wünschen ihr beruflich wie persönlich alles Gute und weiterhin viel Erfolg."
    ]
  }
}

Render it through the API

Save the sample data as data.json and send it with the template’s name. TypeScript and Python use the SDKs; every other language posts the same JSON to the REST API with its standard library. Renders with a key that starts with ff_test_ are not metered; on the Free plan they carry a small watermark.

render.shShell
jq '{template: "arbeitszeugnis", data: ., filename: "arbeitszeugnis-erika-mustermann.pdf"}' data.json \
  | curl https://api-eu.formfeed.dev/v1/renders \
      -H "Authorization: Bearer ff_test_..." \
      -H "Content-Type: application/json" \
      --data-binary @-
render.tsTypeScript
import { Formfeed } from '@formfeed/sdk';
import data from './data.json' with { type: 'json' };

const formfeed = new Formfeed({ apiKey: process.env.FORMFEED_API_KEY! });

const render = await formfeed.renders.create({
  template: 'arbeitszeugnis',
  data,
  filename: 'arbeitszeugnis-erika-mustermann.pdf',
});
console.log(render.status, render.download_url);
render.pyPython
import json
import os

from formfeed import Formfeed

formfeed = Formfeed(api_key=os.environ["FORMFEED_API_KEY"])

with open("data.json", encoding="utf-8") as file:
    data = json.load(file)

render = formfeed.renders.create(
    template="arbeitszeugnis",
    data=data,
    filename="arbeitszeugnis-erika-mustermann.pdf",
)
print(render.status, render.download_url)
render.phpPHP
<?php
$body = [
    'template' => 'arbeitszeugnis',
    'data' => json_decode(file_get_contents('data.json'), true),
    'filename' => 'arbeitszeugnis-erika-mustermann.pdf',
];

$curl = curl_init('https://api-eu.formfeed.dev/v1/renders');
curl_setopt_array($curl, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('FORMFEED_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode($body),
]);
$render = json_decode(curl_exec($curl), true);

echo $render['status'], ' ', $render['download_url'], PHP_EOL;
main.goGo
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
	"os"
)

func main() {
	data, err := os.ReadFile("data.json")
	if err != nil {
		panic(err)
	}
	body, _ := json.Marshal(map[string]any{
		"template": "arbeitszeugnis",
		"data":     json.RawMessage(data),
		"filename": "arbeitszeugnis-erika-mustermann.pdf",
	})

	request, _ := http.NewRequest("POST", "https://api-eu.formfeed.dev/v1/renders", bytes.NewReader(body))
	request.Header.Set("Authorization", "Bearer "+os.Getenv("FORMFEED_API_KEY"))
	request.Header.Set("Content-Type", "application/json")

	response, err := http.DefaultClient.Do(request)
	if err != nil {
		panic(err)
	}
	defer response.Body.Close()

	var render struct {
		Status      string `json:"status"`
		DownloadURL string `json:"download_url"`
	}
	json.NewDecoder(response.Body).Decode(&render)
	fmt.Println(render.Status, render.DownloadURL)
}
Program.csC#
using System.Net.Http.Headers;
using System.Net.Http.Json;
using System.Text.Json;

var body = new
{
    template = "arbeitszeugnis",
    data = JsonDocument.Parse(File.ReadAllText("data.json")).RootElement,
    filename = "arbeitszeugnis-erika-mustermann.pdf",
};

using var http = new HttpClient();
http.DefaultRequestHeaders.Authorization =
    new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("FORMFEED_API_KEY"));

var response = await http.PostAsJsonAsync("https://api-eu.formfeed.dev/v1/renders", body);
var render = await response.Content.ReadFromJsonAsync<JsonElement>();

Console.WriteLine($"{render.GetProperty("status")} {render.GetProperty("download_url")}");
Render.javaJava
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Files;
import java.nio.file.Path;

public class Render {
  public static void main(String[] args) throws Exception {
    String data = Files.readString(Path.of("data.json"));
    String body = """
        {
          "template": "arbeitszeugnis",
          "filename": "arbeitszeugnis-erika-mustermann.pdf",
          "data": %s
        }
        """.formatted(data);

    HttpRequest request = HttpRequest.newBuilder(URI.create("https://api-eu.formfeed.dev/v1/renders"))
        .header("Authorization", "Bearer " + System.getenv("FORMFEED_API_KEY"))
        .header("Content-Type", "application/json")
        .POST(HttpRequest.BodyPublishers.ofString(body))
        .build();

    HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
    System.out.println(response.body()); // status, download_url, page_count, units …
  }
}
render.rbRuby
require "json"
require "net/http"

body = {
  template: "arbeitszeugnis",
  data: JSON.parse(File.read("data.json")),
  filename: "arbeitszeugnis-erika-mustermann.pdf",
}

response = Net::HTTP.post(
  URI("https://api-eu.formfeed.dev/v1/renders"),
  JSON.generate(body),
  "Authorization" => "Bearer #{ENV.fetch("FORMFEED_API_KEY")}",
  "Content-Type" => "application/json"
)
render = JSON.parse(response.body)

puts render["status"], render["download_url"]

Start rendering today

The free plan includes 100 units a month and free test renders. Change plans when you need more.