HandlebarsPDF
German timesheet (Stundenzettel) with balance and projects
A weekly timesheet in Handlebars: weekdays formatted in German, worked hours summed and set against the target with subtract, and the same entries grouped by project for the summary. Two signature lines stay together at the foot of the page.
Free plan, no card. You get your own copy in the editor, published and ready for the API.
Change a value, watch the document follow
This is Formfeed’s template engine, running in your browser. Nothing you type is sent or saved.
Loading the engine …

The document as the engine writes it, in pages as the API prints the PDF from it. Shown here on one sheet. The PDF breaks it into pages.
You get your own copy in the editor, with the example’s data. What you changed here stays on this page.
Rendered result
What this example shows
{{date day "EEE, dd.MM."}}prints the weekday in German (Mo., 14.09.) because the template’s locale isde-DE.- The balance is
(subtract (sum entries "hours") sheet.target_hours): 40.5 hours worked against 40 gives0,50h. {{#each (groupBy entries "project")}}reuses the same entries for the project summary, withsum items "hours"inside each group.- Start, end and break are shown as they were recorded; the hours per day come from the time tracking system, which knows its own rounding rules.
- One batch renders the whole team’s week, with the employee number and the calendar week in each file name.
Helpers used
Template folder
<header>
<div>
<h1>Stundenzettel</h1>
<p class="muted">Kalenderwoche {{sheet.week}} · {{date sheet.from "dd.MM."}} bis {{date sheet.until "dd.MM.yyyy"}}</p>
</div>
<p class="who"><strong>{{employee.name}}</strong><br>Personalnr. {{employee.number}}<br>{{company.name}}</p>
</header>
<table class="lines">
<thead>
<tr><th>Tag</th><th>Projekt</th><th>Tätigkeit</th><th class="num">Von</th><th class="num">Bis</th><th class="num">Pause</th><th class="num">Stunden</th></tr>
</thead>
<tbody>
{{#each entries}}
<tr>
<td>{{date day "EEE, dd.MM."}}</td>
<td>{{project}}</td>
<td>{{task}}</td>
<td class="num">{{from}}</td>
<td class="num">{{to}}</td>
<td class="num">{{break_minutes}} min</td>
<td class="num">{{number hours 2}}</td>
</tr>
{{/each}}
</tbody>
</table>
<table class="totals">
<tr><td>Gearbeitet</td><td class="num">{{number (sum entries "hours") 2}} h</td></tr>
<tr><td>Soll</td><td class="num">{{number sheet.target_hours 2}} h</td></tr>
<tr class="grand"><td>Saldo</td><td class="num">{{number (subtract (sum entries "hours") sheet.target_hours) 2}} h</td></tr>
</table>
<h2>Nach Projekt</h2>
<ul class="projects">
{{#each (groupBy entries "project")}}
<li><span>{{key}}</span><strong>{{number (sum items "hours") 2}} h</strong></li>
{{/each}}
</ul>
<footer>
<div><span></span>Datum, Unterschrift Mitarbeiter/in</div>
<div><span></span>Datum, Unterschrift Vorgesetzte/r</div>
</footer>body { font-family: 'Inter', sans-serif; font-size: 9.5pt; line-height: 1.45; color: #1e293b; }
.sender {
display: inline-block;
margin: 10mm 0 3mm;
padding-bottom: 1mm;
border-bottom: 1px solid #cbd5e1;
font-size: 7pt;
color: #64748b;
}
.recipient { min-height: 27mm; font-style: normal; line-height: 1.5; }
.facts { float: right; margin-top: -27mm; font-size: 8.5pt; color: #475569; }
.facts td { padding: 0.4mm 0 0.4mm 5mm; }
.facts td:last-child { text-align: right; color: #1e293b; }
h1 { clear: both; margin: 14mm 0 4mm; font-size: 16pt; color: #312e81; }
table.lines { width: 100%; margin-top: 6mm; border-collapse: collapse; }
.lines th {
padding: 2mm 1.5mm;
border-bottom: 1.5px solid #1e293b;
text-align: left;
font-size: 7.5pt;
letter-spacing: 0.05em;
text-transform: uppercase;
color: #64748b;
}
.lines td { padding: 2.3mm 1.5mm; border-bottom: 1px solid #e2e8f0; vertical-align: top; }
.lines tr { break-inside: avoid; }
.num { text-align: right !important; white-space: nowrap; }
.totals { width: 78mm; margin: 5mm 0 0 auto; border-collapse: collapse; break-inside: avoid; }
.totals td { padding: 1.2mm 1.5mm; }
.totals .grand td { border-top: 1.5px solid #1e293b; font-weight: 700; font-size: 11pt; }
.muted { color: #64748b; }
header { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 5mm; border-bottom: 1px solid #e2e8f0; }
h1 { margin: 0; clear: none; }
.muted { margin: 1mm 0 0; }
.who { margin: 0; text-align: right; font-size: 9pt; line-height: 1.5; }
h2 { margin: 10mm 0 2mm; font-size: 11pt; }
.projects { margin: 0; padding: 0; list-style: none; width: 78mm; }
.projects li { display: flex; justify-content: space-between; padding: 1.2mm 0; border-bottom: 1px solid #e2e8f0; }
footer { display: flex; gap: 12mm; margin-top: 22mm; break-inside: avoid; font-size: 8pt; color: #64748b; }
footer div { flex: 1; }
footer span { display: block; margin-bottom: 1.5mm; border-top: 1px solid #1e293b; }<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap">{
"pdf": {
"metadata": {
"title": "Stundenzettel"
}
},
"paper": {
"format": "A4"
},
"margin": {
"top": "18mm",
"right": "18mm",
"bottom": "18mm",
"left": "18mm"
},
"locale": "de-DE",
"timezone": "Europe/Berlin"
}{
"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": {
"name": "Max Mustermann",
"number": "E-0417"
},
"sheet": {
"week": 38,
"from": "2026-09-14",
"until": "2026-09-18",
"target_hours": 40
},
"entries": [
{
"day": "2026-09-14",
"project": "Kundenportal",
"task": "Rendering-Pipeline",
"from": "08:30",
"to": "17:30",
"break_minutes": 45,
"hours": 8.25
},
{
"day": "2026-09-15",
"project": "Kundenportal",
"task": "Review und Tests",
"from": "08:30",
"to": "17:00",
"break_minutes": 30,
"hours": 8
},
{
"day": "2026-09-16",
"project": "Intern",
"task": "Teamtag",
"from": "09:00",
"to": "16:30",
"break_minutes": 60,
"hours": 6.5
},
{
"day": "2026-09-17",
"project": "Kundenportal",
"task": "Release",
"from": "08:00",
"to": "18:30",
"break_minutes": 45,
"hours": 9.75
},
{
"day": "2026-09-18",
"project": "Wartung",
"task": "Updates und Monitoring",
"from": "08:30",
"to": "17:00",
"break_minutes": 30,
"hours": 8
}
]
}Render it through the API
Save the sample data as data.json and send it with the template’s name. Each language uses its SDK; curl sends the same JSON to the REST API, as any other language can. Renders with a key that starts with ff_test_ are not metered; on the Free plan they carry a small watermark.
jq '{template: "stundenzettel", data: ., filename: "stundenzettel-E-0417-kw38.pdf"}' data.json \
| curl https://api-eu.formfeed.dev/v1/renders \
-H "Authorization: Bearer ff_test_..." \
-H "Content-Type: application/json" \
--data-binary @-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: 'stundenzettel',
data,
filename: 'stundenzettel-E-0417-kw38.pdf',
});
console.log(render.status, render.download_url);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="stundenzettel",
data=data,
filename="stundenzettel-E-0417-kw38.pdf",
)
print(render.status, render.download_url)<?php
require __DIR__ . '/vendor/autoload.php';
$formfeed = new Formfeed\Client(apiKey: getenv('FORMFEED_API_KEY'));
$render = $formfeed->renders->create([
'template' => 'stundenzettel',
'data' => json_decode(file_get_contents('data.json'), true),
'filename' => 'stundenzettel-E-0417-kw38.pdf',
]);
echo $render->status, ' ', $render->downloadUrl, PHP_EOL;package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
formfeed "github.com/formfeed-dev/formfeed-go"
)
func main() {
client := formfeed.NewClient(os.Getenv("FORMFEED_API_KEY"))
contents, err := os.ReadFile("data.json")
if err != nil {
log.Fatal(err)
}
var data map[string]any
if err := json.Unmarshal(contents, &data); err != nil {
log.Fatal(err)
}
render, err := client.Renders.Create(context.Background(), formfeed.RenderRequest{
Template: "stundenzettel",
Data: data,
Filename: "stundenzettel-E-0417-kw38.pdf",
})
if err != nil {
log.Fatal(err)
}
fmt.Println(render.Status, render.DownloadURL)
}using System.Text.Json;
using Formfeed;
using var formfeed = new FormfeedClient(Environment.GetEnvironmentVariable("FORMFEED_API_KEY"));
var render = await formfeed.Renders.CreateAsync(new RenderRequest
{
Template = "stundenzettel",
Data = JsonSerializer.Deserialize<Dictionary<string, object?>>(File.ReadAllText("data.json")),
Filename = "stundenzettel-E-0417-kw38.pdf",
});
Console.WriteLine($"{render.Status} {render.DownloadUrl}");import com.fasterxml.jackson.databind.ObjectMapper;
import dev.formfeed.Formfeed;
import dev.formfeed.RenderRequest;
import java.io.File;
public class Render {
public static void main(String[] args) throws Exception {
var formfeed = Formfeed.builder().apiKey(System.getenv("FORMFEED_API_KEY")).build();
var data = new ObjectMapper().readTree(new File("data.json"));
var request = RenderRequest.template("stundenzettel")
.data(data)
.filename("stundenzettel-E-0417-kw38.pdf");
var render = formfeed.renders().create(request);
System.out.println(render.getStatus() + " " + render.getDownloadUrl());
}
}require "json"
require "formfeed"
formfeed = Formfeed::Client.new(api_key: ENV.fetch("FORMFEED_API_KEY"))
render = formfeed.renders.create(
template: "stundenzettel",
data: JSON.parse(File.read("data.json")),
filename: "stundenzettel-E-0417-kw38.pdf"
)
puts "#{render.status} #{render.download_url}"More ways to call it
// the whole team's week as one job
const job = await formfeed.renders.batch({
template: 'stundenzettel',
zip: true,
items: team.map(({ employee, entries }) => ({
data: { company, employee, sheet, entries },
filename: `stundenzettel-${employee.number}-kw${sheet.week}.pdf`,
})),
});Start rendering today
The free plan includes 100 units a month and free test renders. Change plans when you need more.