Getting started

Introduction

brevier turns a template and your data into a finished PDF. This page shows the idea and the steps in between.

On this page

What brevier does

brevier makes business documents: invoices, letters, contracts and reports. You give it two things:

  • a template in HTML or Markdown, styled with CSS
  • your data as JSON

brevier puts the data into the template and prints a PDF.

brevier render rechnung.html --data rechnung.json -o rechnung.pdf

The template is a normal web file. You write it in your editor, you check it into Git, and you review it like code. There is no drawing tool and no special file format.

How a document is made

Every render goes through the same five steps.

Step What happens
1. Compile A Markdown template becomes HTML. An HTML template stays as it is.
2. Check If a schema file sits next to the template, brevier checks the template and the data against it.
3. Bind Each {{ field }} gets its value from the data. Loops and conditions run.
4. Prepare brevier adds German hyphenation and non-breaking spaces to the text.
5. Print The engine lays out the pages and writes the PDF.

Step 2 stops the render when something does not match. You see the error in your terminal or your build, not on paper at the customer.

Add --debug to a render. brevier then writes the exact HTML and CSS the engine received next to the PDF. You can open that HTML in a browser.

Who it is for

brevier is for developers who print documents from their own code. You know HTML and CSS, and you want the same review, tests and CI for your documents that you have for the rest of your software.

Where to go next