Skip to content
HALOWERK

Formatwerk

form from schema

Walks a JSON Schema object (local $ref resolved; nested objects up to 3 levels become sections with dotted field names) and lays out a fillable A4/Letter AcroForm with pdf-lib: strings become text fields (maxLength as character limit, long texts multi-line), numbers/dates get format hints, enums with up to 4 values radio buttons, longer enums dropdowns, booleans and arrays of enums checkboxes. required sets the PDF required flag, default prefills. Base fonts (WinAnsi).

POST https://format.halowerk.com/v1/form-from-schema

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
schemaobjectYesJSON Schema of type object with properties.
titlestringNoForm title; default schema.title.
page_sizestringNo
font_size_ptnumberNo
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema"
  ],
  "properties": {
    "schema": {
      "type": "object",
      "description": "JSON Schema of type object with properties."
    },
    "title": {
      "type": "string",
      "maxLength": 150,
      "description": "Form title; default schema.title."
    },
    "page_size": {
      "type": "string",
      "enum": [
        "A4",
        "Letter"
      ],
      "default": "A4"
    },
    "font_size_pt": {
      "type": "number",
      "minimum": 8,
      "maximum": 12,
      "default": 10
    }
  }
}

Open original schema

Published input example

{
  "schema": {
    "title": "Course registration",
    "type": "object",
    "required": [
      "name"
    ],
    "properties": {
      "name": {
        "type": "string",
        "maxLength": 60
      },
      "course": {
        "type": "string",
        "enum": [
          "First aid",
          "Fire safety"
        ]
      },
      "newsletter": {
        "type": "boolean"
      }
    }
  }
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’