Setup

Everything on this page is also in the README.md inside the archive. The renderer is one static binary: nothing is installed system-wide, no service is started and no configuration file is required.

Install in four steps

  1. Verify the archive

    Compare the download with the SHA-256 checksum published next to it, then unpack it anywhere. The directory is self-contained.

  2. Point it at the fonts

    The archive ships 130 font families. Name that directory in the manifest's fonts field, or leave it out and use the built-in DejaVu faces.

  3. Write the request

    One JSON manifest line, then the template, data and report bytes in the order the manifest names them.

  4. Render

    Write the request to stdin, read the result line and the document from stdout. Exit code 0 means the document is complete.

Verify and render

sha256sum -c SHA256SUMS
tar xzf erd-report-renderer-1.0.2-linux-x64.tar.gz
cd erd-report-renderer-1.0.2-linux-x64
./erd-report-render < request.bin > invoice.pdf

The request manifest

{"protocol":2,"format":"pdf","sections":{"template":1234,"data":56},"fonts":"/opt/erd-report/fonts"}

Exit codes

CodeMeaning
0Document complete
2Request or manifest refused
3Template refused
4Data refused
6Rendering failed
70Writing failed

Fonts and resources

Fonts

The engine never reads the fonts installed on the host. It reads the fonts/ directory in the archive — every family carries its own LICENSE.txt — or the directory you name in the manifest.

Resources

A template can name images and font files instead of embedding them as data: URIs. Put those files in one directory and name it in the manifest's resources field. A template that only uses data: URIs needs no resources directory.

From PHP

$process = proc_open(
    './erd-report-render',
    [0 => ['pipe', 'r'], 1 => ['pipe', 'w'], 2 => ['pipe', 'w']],
    $pipes
);
fwrite($pipes[0], $request);
fclose($pipes[0]);
$document    = stream_get_contents($pipes[1]);
$diagnostics = stream_get_contents($pipes[2]);
fclose($pipes[1]);
fclose($pipes[2]);

if (proc_close($process) !== 0) {
    throw new RuntimeException(trim($diagnostics));
}
file_put_contents('invoice.pdf', $document);

From Node.js

import { spawn } from 'node:child_process';
import { writeFileSync } from 'node:fs';

const child  = spawn('./erd-report-render');
const chunks = [];

child.stdout.on('data', (chunk) => chunks.push(chunk));
child.stderr.on('data', (chunk) => process.stderr.write(chunk));
child.on('close', (code) => {
    if (code !== 0) throw new Error('render refused: exit ' + code);
    writeFileSync('invoice.pdf', Buffer.concat(chunks));
});
child.stdin.end(request);
Nothing touches the disk:

There is no request file and no output file. The only write is font metadata in the cache directory (XDG_CACHE_HOME or TMPDIR), which is the only directory the process needs to be able to write.

Setup questions

Does it run on Windows or macOS?

There is no native Windows or macOS build: the engine is Linux x86-64 only. On those hosts it runs in a Linux container or VM.

Do I have to install fonts?

No. The engine never reads host fonts. The archive contains 130 font families with their own licence files; without a fonts field in the manifest, only the built-in DejaVu faces are available.

How do I password-protect an XLSX?

The password goes in the request's password section — never in an argument, an environment variable or a manifest field. It is read and discarded with the request.

Can I run it in Docker?

Yes. It is a single static binary with no dependencies, so a minimal Linux image is enough; mount the fonts read-only and give the process a writable cache directory.

Does it need network access?

No. A render works fully offline. The only exception is a template that names a timestamp authority for a signed PDF.

Running this in production? Choose an edition and a term, and see the price before you request anything.

Request a licence

Frequently asked questions

What is EREL?

EREL — the ERD Reporting Expression Language — is the small, safe language a template uses wherever a value has to be worked out: an element binding, a visibility rule, a group key, a formatting rule, a chart series, a barcode value.

It is deliberately closed. There are literals, references to the data and to the report, member access, a fixed set of built-in functions such as format.currency, concat and count, and the usual arithmetic, comparison, logical and conditional operators. There is no input or output, no loop, no user-defined function and no way to reach the host, so a template stays data and never becomes code.

The designer and the engine each implement EREL, and both have to produce the same value — or the same diagnostic — for every valid expression. That is why a template looks the same in the designer and in the document ERD Report Renderer produces from it.

What is a template?

A template is a JSON document (format erd-report-template, templateVersion 1): pages measured in points, each holding elements with a fixed frame and optional repeating bands, with an EREL expression wherever a value comes from the data. It can carry a dataSchema that says which data it expects, and images are embedded as data URIs — a URL or a file path in a template is never fetched.

The designer exports it, and your application hands it to the binary in the request itself: the manifest line, then the template bytes, then the data. The renderer keeps no template store, so every call carries the template it should draw.

Search all ERD Report Renderer help topics