Skip to content

Letters, clearly composed.

From a first paragraph to reusable company stationery. Choose your API, see the result, and build with confidence.

Four ways to author

Use fluent Java, immutable Java values, strict JSON or letter HTML. Every route reaches the same PDF engine.

Built for real letters

Control stationery, pagination, rich tables, visible signatures, localization and reusable company styling.

See what you will get

Browse generated PDFs and previews. Download complete programs, template inputs and assets.

Know the boundaries

Find exact attributes, units, inheritance rules and rendering limits before integration.

Your API choice is remembered across documentation pages. Java examples below are complete programs; JSON and HTML show their complete input documents.

import com.nsdev.lettergenerator.Letter;
import com.nsdev.lettergenerator.LetterPdfGenerator;
import java.nio.file.Files;
import java.nio.file.Path;
/** A complete first letter using the fluent API and engine-provided standard fonts. */
public final class FluentQuickstart {
private FluentQuickstart() {}
public static void main(String[] args) throws Exception {
var letter = Letter.builder().body("Hello from Letter Generator").build();
byte[] pdf = new LetterPdfGenerator().generate(letter);
Files.write(Path.of(args.length == 0 ? "letter.pdf" : args[0]), pdf);
}
}