Fork me on GitHub
Latest release0.5.0-alpha.7

OPEN SOURCE DOCUMENT GENERATION

Documents from
your templates.

Bring a Word template and your data. Create documents that keep your layout, with the content your readers need.

Java 17 · Apache 2.0 · Run it on your infrastructure

Container 0.5.0-alpha.7 · Maven libraries 0.5.0-alpha.7. Evaluation alpha; APIs are not yet stable.

YOUR DATA
{
  "customer": { "name": "Ada" },
  "reference": "NF-001",
  "draft": false
}
NuaFormaNF-001

Project summary

Prepared for Ada

ItemQuantity
Template design1
Document delivery3
Your formatting. Your content.
DOCX & PDF
Word templates in.DOCXorPDF · PDF/A-1b · PDF/A-2b · PDF/A-3bout.

ALSO FROM NUAFORMA · A STANDALONE LIBRARY

Image Comparison.
See what changed.

Turn visual differences into useful test feedback. Compare reference images, mark changed regions and exclude known variation, with a Java core and an optional Kotlin assertion DSL.

Java 17+ · Apache 2.0 · Version 5.0.0

A project summary with three changed regions outlined in red by the image comparison engine.
EXPECTED ≠ ACTUAL3 changes. Clearly marked.

FOR BUSINESSES & INDIVIDUALS

Keep the document.
Change the details.

Letters, agreements and reports often share a structure. NuaForma fills that structure with your own data, without making you redesign the document.

01

Author in Word

Keep styles, tables, images, headers and supported text boxes. Add placeholders and conditional content where they belong.

02

Make content relevant

Include or omit sections, repeat table rows, and handle nested lists and empty values. One template can serve several situations.

03

Choose the result

Generate editable DOCX, ordinary PDF or validated B-level PDF/A. Add a text watermark when a document is still a draft.

04

Keep control

Run on your own infrastructure. Document generation needs no cloud account or network downloads. You choose your fonts and data.

This is an evaluation alpha, not a promise to reproduce every Word feature. Read the supported profiles and known limitations ↗

FOR YOUR ORGANIZATION

Control how your
documents are processed.

Business documents can contain sensitive information. NuaForma gives your team control over deployment and applies explicit processing limits, with request-local native rendering and independently bounded PDF validation.

Keep data on your infrastructure

Generate documents on-premise without a mandatory cloud account, telemetry or implicit downloads of document content. Your organization chooses where the service runs and who may access it.

Bound PDF processing

Native PDF generation runs inside the service with separate processing state and limits for each request. Independent PDF checks use bounded processes and private working files. The container provides the system boundary; there are no separate per-request filesystem or network sandboxes.

Limit what templates can do

Templates use a restricted expression language, not arbitrary application code. Archive, upload, expansion and execution limits bound supported processing. Templates can access all supplied document data, so callers must send only the data they are allowed to include.

Deploy with explicit safeguards

The supplied Compose setup uses a non-root user, read-only root filesystem, dropped capabilities, runtime default security policies and bounded temporary storage. PDF/A files are validated before delivery; unsupported requests fail rather than silently changing output.

These controls are not a complete sandbox for in-process DOCX parsing or installed extensions. Extensions are trusted operator code. The service has no built-in authentication or TLS: use an authenticated TLS gateway, deployment quotas and appropriate host security policies. This evaluation alpha has accepted native-runtime security findings; review the deployment and isolation guide ↗ before production use.

Maven & Gradle release channels → · Fonts, diagnostics and operator configuration → · Short processing trials → Indicative measurements, not sustained capacity guarantees.

FOR DEVELOPERS

An engine first.
A service when you need one.

Embed the Java 17 engine in Kotlin or Java, or use the same engine through the REST service. Format support is discovered through public provider contracts.

Available in the alpha

  • DOCX → DOCX and DOCX → PDF
  • Nested conditions, repetitions and generic JSON data
  • Null fallbacks, string checks, number and date formatting
  • Text watermarks, supplied fonts and font-based barcodes
  • ServiceLoader providers and separately usable libraries
  • Multipart REST, capabilities and OpenAPI JSON/YAML
build.gradle.kts
repositories {
    mavenCentral()
    maven {
        url = uri("https://repo.nuaforma.dev/repository/nuaforma-prereleases/")
        content { includeGroup("dev.nuaforma") }
        mavenContent { releasesOnly() }
    }
}

dependencies {
    implementation("dev.nuaforma:nuaforma-core:0.5.0-alpha.7")
    implementation("dev.nuaforma:nuaforma-docx:0.5.0-alpha.7")
    // Optional: native PDF output
    implementation("dev.nuaforma:nuaforma-docx-pdf:0.5.0-alpha.7")
}

DOCX and native PDF libraries run in your JVM without LibreOffice. Configure fonts and independent validation using the native PDF guide. Maven & Gradle Nexus setup →

FIND YOUR GUIDE

Use, build or extend

Start with the documentation index for templates, PDF profiles, REST, deployment and operational guides. Building NuaForma, writing private extensions and contributing upstream have their own focused instructions.

0.5 & ROADMAP

More Word documents.
Same shared engine.

Version 0.5.0-alpha.7 preserves more Word table grids, merged-cell borders, list markers and floating pictures. It adds support for filled polygons in qualified placeable WMF images and more saved Word metadata. The Playground pinpoints certain unsupported text frames and list-numbering effects. The 0.5 series adds Boolean checkbox content and broadens the qualified DOCX profile. Check marks and crosses are drawn as vectors, with an optional box and inherited size/bold styling. Word conversion handles more table widths, cell margins, minimum row heights, justified text, character spacing and font metrics. It also retains more passive authoring metadata and validated form-field display text.

Standard PDF and PDF/A-1b/2b/3b retain embedded caller fonts and independent validation. Native DOCX and Playground cleanup admit up to 256 package entries within the existing byte limits. Independent A4/Letter Word controls and protected visual regressions qualify specific features; arbitrary DOCX compatibility remains outside this evaluation-alpha promise. Read the release notes and checkbox examples.

Native-runtime security follow-up, OpenDocument/spreadsheet providers and signable fields remain roadmap work. The operations guide explains fonts, validation and deployment boundaries.

View open issues ↗
How to deployCompose · Dockerfile · Helm

Choose the native Linux/amd64 or Linux/arm64 container. Keep it private behind an authenticated TLS gateway for remote access. Preserve non-root execution, a read-only filesystem, bounded temporary storage and runtime default security policies.

Run with Docker Compose

Choose AMD64 for Intel/AMD hosts or ARM64 for Apple Silicon and other ARM64 hosts. No custom image build, seccomp.json or AppArmor profile installation is required. Keep runtime default policies and supplied limits.

compose.yaml
services:
  nuaforma:
    image: ghcr.io/nuaforma/nuaforma:0.5.0-alpha.7
    platform: linux/amd64
    init: true
    user: "1000:1000"
    read_only: true
    cap_drop: [ALL]
    security_opt:
      - no-new-privileges:true
    pids_limit: 128
    mem_limit: 2g
    cpus: 2
    tmpfs:
      - /tmp:rw,size=512m,mode=1777
    ports:
      - "127.0.0.1:8080:8080"
    environment:
      NUAFORMA_HEAP_MB: "512"
      NUAFORMA_HOST: "0.0.0.0"
      NUAFORMA_PORT: "8080"
    volumes:
      - ${NUAFORMA_CUSTOM_FONTS_DIR:-./custom-fonts}:/opt/nuaforma/custom-fonts:ro
      - ${NUAFORMA_EXTENSIONS_DIR:-./extensions}:/opt/nuaforma/extensions:ro
    stop_grace_period: 15s

Create custom-fonts and extensions next to the Compose file. Place your own TTF/OTF fonts in custom-fonts, readable by UID/GID 1000; restart after changing fonts or trusted extension JARs. Both directories are mounted read-only.

Terminal
mkdir -p custom-fonts extensions
docker compose up -d
curl --fail http://127.0.0.1:8080/api/v1/capabilities

# Stop the service when finished:
docker compose down

The service binds to loopback port 8080. Add an authenticated TLS gateway before remote access. Keep the runtime default host security policies; no custom host profile is required.

Each kit includes compose.yaml, README.md, Dockerfile, NOTICE and LICENSE. Extract before starting Compose.

Download not starting?

Check your browser downloads or download the complete kit with curl:

Terminal · use curl.exe in Windows PowerShell
curl --fail --location https://nuaforma.dev/downloads/docker-kit.zip --output docker-kit.zip

Extract docker-kit.zip before running the start commands above. Preserve the supplied limits and runtime default security policies.

DEVELOPMENT ONLY

Try the Playground

Build requests, try your templates and investigate errors on your own development installation. Explore examples, font setup and the marked diagnostic PDF.

Development mode can expose document text in responses and logs. The production image contains the API without this interface.

TEMPLATES & EXTENSIONS

Learn the markers.
Make them your own.

Use fields, inline conditions, nested loops, null checks, formatting and Base64 images in your Word templates. Add private value pipes or your own generator when you need more.

TRY IT ON YOUR OWN INSTALLATION

One template.
Several ways to fill it.

Download a Word template with images, tables, nested conditions and repeating content. Pick a JSON request below and submit it to your NuaForma service with Bruno, curl or another HTTP client.

Nothing is uploaded to this website. It does not generate documents or connect to your service. All template/data submissions happen in your own HTTP client.

Loading examples

request.json
Download this JSON ↓

Download everything ↓ One organized ZIP: AMD64/ARM64 Compose, Helm, test examples, Bruno and Postman. Start with START-HERE.md.

How to test · Bruno · Postman · curl

Start your own NuaForma service first. Each collection contains version, capabilities, assessment, OpenAPI JSON/YAML and all seven document requests, with local Word/JSON files. Set baseUrl if your service is not at http://localhost:8080. Check that the PDF provider lists pdf under available.writeFormats before generating PDF; declared formats alone do not establish readiness.

Open a ready-made Bruno collection

Download Bruno collection kit ↓
  1. Extract the entire ZIP. In Bruno choose Open Collection, then select the folder containing bruno.json.
  2. Set the collection variable baseUrl if needed. No environment selection is required. Keep assets/ beside bruno.json; file paths are relative to the collection root.
  3. Send Version and Capabilities, then choose one of the seven document requests. Multipart file parts and content types are already configured.
  4. Save the successful binary response using Bruno's response download/save action: PDF for examples 01–04/06–07, DOCX for 05.

Edit JSON files under assets/ to try different data. No filesystem scripts or extra sandbox permissions are needed. Optional CLI instructions are in the kit README.

Let the client generate the multipart boundary: do not set a top-level Content-Type on generation requests. Allow at least 180 seconds for local PDF requests. Only save a document after HTTP 200; failures return JSON diagnostics. The included tests check responses, not visual fidelity or readiness on every host.

data holds template values. General options such as locale and watermark live under options; PDF profile options live under output.options. The website examples are complete request envelopes, not just data objects.

THE REST ENDPOINTS

See what is available.
Then create a document.

GET/api/v1/version

Packaged version, contract version and source commit. Does not check PDF readiness.

GET/health/live · /health/ready

Lightweight liveness and readiness for Docker and Kubernetes probes. Readiness does not guarantee a particular PDF request can run.

GET/api/v1/sbom

Download the build-generated CycloneDX 1.7 JSON inventory of shipped components. Private fonts, extensions and request data are not inventoried.

GET/api/v1/capabilities

Providers, usable formats, option descriptions and bundled/mounted font catalogs. Private uploads are never listed.

POST/api/v1/assess

Send the JSON request envelope to assess options and provider readiness. No template is uploaded or validated.

POST/api/v1/documents

Send multipart request, template and optional resource files. Receive a document attachment or structured diagnostics.

GET/openapi.json · /openapi.yaml

Download equivalent OpenAPI definitions from your own service for documentation and client tooling.

Typical error statuses: 400 malformed transport, 422 invalid or unsupported content/options, 408 deadline exceeded, 503 provider unavailable. Consult the REST guide for the full contract and limits.

BUILT IN THE OPEN

Try a template.
Bring your use case.

Use NuaForma internally or embed it in your application. Feedback and small, non-confidential examples help shape what comes next.

Explore the repository ↗

Evaluation alpha. Runtime component security follow-up is tracked in issue #51; inspect candidate-specific findings before deployment. See issue #51 and the release notes. No authentication or TLS is built into the service.