{
  "v": 1,
  "root": ["document", {"title": "Service invoice"}, ["page", {"size": "A5", "style": {"padding": 32, "fontSize": 10}},
    ["text", {"fixed": true, "style": {"fontSize": 16, "fontWeight": "bold", "marginBottom": 12}}, "Invoice ", ["field", "number"]],
    ["text", {"style": {"marginBottom": 12}}, "Billed to ", ["field", "customer"]],
    ["each", "items", ["view", {"wrap": false, "style": {"flexDirection": "row", "paddingVertical": 8, "borderBottomWidth": 1, "borderBottomColor": "#cccccc"}},
      ["text", {"style": {"flex": 1}}, ["field", "description"]],
      ["text", {"style": {"width": 70, "textAlign": "right"}}, ["field", "amount"]]
    ]],
    ["text", {"style": {"marginTop": 12, "fontWeight": "bold", "textAlign": "right"}}, "Total ", ["field", "total"]],
    ["text", {"fixed": true, "pageNumberText": "Page {pageNumber} of {totalPages}", "style": {"position": "absolute", "bottom": 12, "right": 32, "fontSize": 8}}]
  ]]
}
