Skip to content

Java document layout and generation engine

Write Java.Make documents.

Generate reports, forms and structured documents with Java APIs or XML templates.

Report page generated by Export4j, showing text, tables and paginated contentOpen report PDF

Export from one semantic model

  • PDF
  • DOCX
  • HTML
  • Markdown
  • SVG
  • PNG

Start with a little Java.

Write your content, supply your fonts, then let the engine handle layout and pagination.

Complete Java example
Java
var fonts = FontGroup.builder()
        .fontFile("fonts/regular.ttf")
        .build();
var engine = DocumentEngine.builder(fonts).build();

var document = Document.builder()
        .heading("Quarterly report", 1)
        .paragraph("A report with automatic pagination.")
        .table(List.of("Metric", "Value"),
                List.of(List.of("Revenue", "120")))
        .build();

engine.write(document, new PdfBackend(), "report.pdf");

Supply your own licensed fonts. The complete example includes dependencies and imports.

Find your next step.

Explore the capability matrix

Java 21 · Apache-2.0 · No Office or browser process required

Currently a release candidate. APIs may change. RC2 release notes