01. Your First Document

This is the smallest useful VMPrint document in AST 1.1.

{
  "documentVersion": "1.1",
  "layout": {
    "pageSize": "A4",
    "margins": { "top": 48, "right": 48, "bottom": 48, "left": 48 },
    "fontFamily": "Arimo",
    "fontSize": 11,
    "lineHeight": 1.4
  },
  "fonts": {
    "regular": "Arimo"
  },
  "styles": {
    "title": {
      "fontSize": 28,
      "fontWeight": "bold",
      "marginBottom": 10
    },
    "body": {
      "marginBottom": 10,
      "textAlign": "justify",
      "allowLineSplit": true,
      "orphans": 2,
      "widows": 2
    }
  },
  "elements": [
    {
      "type": "title",
      "content": "Hello, VMPrint"
    },
    {
      "type": "body",
      "content": "This is a simple AST 1.1 document. The engine will normalize it internally and paginate it into positioned page boxes."
    }
  ]
}

Run it:

vmprint --input document.json --output out.pdf

What matters most:

Rules of thumb:

Next: