{
  "key": "file_a4_premium_professional",
  "name": "A4 Premium Professional",
  "size": "A4",
  "template_json": {
    "version": 1,
    "settings": {
      "size": "A4",
      "font_family": "Arial, sans-serif",
      "font_style": "normal",
      "custom_css": ""
    },
    "components": [
      {
        "type": "image",
        "label": "Logo",
        "content": {
          "tagSource": "logo",
          "alt": "logo"
        },
        "layout": {
          "width": 20,
          "newLine": true
        },
        "style": {
          "maxHeight": 80,
          "textAlign": "left"
        },
        "visibility": {
          "tokens": [
            "logo"
          ],
          "groupKey": "header_logo"
        }
      },
      {
        "type": "text",
        "label": "Business Name",
        "content": {
          "mode": "tag",
          "tag": "display_name"
        },
        "layout": {
          "width": 80,
          "newLine": false
        },
        "style": {
          "fontSize": 24,
          "bold": true,
          "textAlign": "right",
          "htmlTag": "h1"
        }
      },
      {
        "type": "text",
        "label": "Address",
        "content": {
          "mode": "tag",
          "tag": "address"
        },
        "style": {
          "fontSize": 13,
          "textAlign": "right",
          "htmlTag": "p"
        }
      },
      {
        "type": "divider",
        "label": "Header Divider",
        "style": {
          "lineStyle": "solid",
          "lineThickness": 2
        }
      },
      {
        "type": "text",
        "label": "Invoice Heading",
        "content": {
          "mode": "static",
          "staticText": "Invoice"
        },
        "layout": {
          "width": 50,
          "newLine": true
        },
        "style": {
          "fontSize": 22,
          "bold": true,
          "textAlign": "left",
          "htmlTag": "h2"
        }
      },
      {
        "type": "text",
        "label": "Invoice Number",
        "content": {
          "mode": "tag",
          "tag": "invoice_no",
          "prefix": "No: "
        },
        "layout": {
          "width": 50,
          "newLine": false
        },
        "style": {
          "fontSize": 14,
          "bold": true,
          "textAlign": "right",
          "htmlTag": "p"
        }
      },
      {
        "type": "text",
        "label": "Invoice Date",
        "content": {
          "mode": "tag",
          "tag": "invoice_date",
          "prefix": "Date: "
        },
        "layout": {
          "width": 50,
          "newLine": true
        },
        "style": {
          "fontSize": 13,
          "textAlign": "left",
          "htmlTag": "p"
        }
      },
      {
        "type": "text",
        "label": "Customer",
        "content": {
          "mode": "tag",
          "tag": "customer_name",
          "prefix": "Bill To: "
        },
        "layout": {
          "width": 50,
          "newLine": false
        },
        "style": {
          "fontSize": 13,
          "textAlign": "right",
          "htmlTag": "p"
        },
        "visibility": {
          "tokens": [
            "customer_name"
          ],
          "groupKey": "customer"
        }
      },
      {
        "type": "table",
        "label": "Line Items",
        "content": {
          "tableMode": "line",
          "columns": [
            {
              "header": "Description",
              "width": 46,
              "align": "left",
              "tags": [
                "line.name"
              ]
            },
            {
              "header": "Qty",
              "width": 14,
              "align": "center",
              "tags": [
                "line.quantity"
              ]
            },
            {
              "header": "Unit Price",
              "width": 20,
              "align": "right",
              "tags": [
                "line.unit_price"
              ]
            },
            {
              "header": "Amount",
              "width": 20,
              "align": "right",
              "tags": [
                "line.line_total"
              ]
            }
          ]
        },
        "style": {
          "headerFontSize": 13,
          "bodyFontSize": 12,
          "headerBold": true,
          "borderStyle": "solid",
          "borderWidth": 1,
          "borderColor": "#000000"
        }
      },
      {
        "type": "text",
        "label": "Subtotal Label",
        "content": {
          "mode": "static",
          "staticText": "Subtotal"
        },
        "layout": {
          "width": 70,
          "newLine": true
        },
        "style": {
          "fontSize": 13,
          "textAlign": "right",
          "htmlTag": "p"
        }
      },
      {
        "type": "text",
        "label": "Subtotal Value",
        "content": {
          "mode": "tag",
          "tag": "subtotal"
        },
        "layout": {
          "width": 30,
          "newLine": false
        },
        "style": {
          "fontSize": 13,
          "textAlign": "right",
          "htmlTag": "p"
        }
      },
      {
        "type": "text",
        "label": "Discount Label",
        "content": {
          "mode": "static",
          "staticText": "Discount"
        },
        "layout": {
          "width": 70,
          "newLine": true
        },
        "style": {
          "fontSize": 13,
          "textAlign": "right",
          "htmlTag": "p"
        }
      },
      {
        "type": "text",
        "label": "Discount Value",
        "content": {
          "mode": "tag",
          "tag": "discount"
        },
        "layout": {
          "width": 30,
          "newLine": false
        },
        "style": {
          "fontSize": 13,
          "textAlign": "right",
          "htmlTag": "p"
        }
      },
      {
        "type": "text",
        "label": "Total Label",
        "content": {
          "mode": "static",
          "staticText": "TOTAL"
        },
        "layout": {
          "width": 70,
          "newLine": true
        },
        "style": {
          "fontSize": 16,
          "bold": true,
          "textAlign": "right",
          "htmlTag": "p"
        }
      },
      {
        "type": "text",
        "label": "Total Value",
        "content": {
          "mode": "tag",
          "tag": "total"
        },
        "layout": {
          "width": 30,
          "newLine": false
        },
        "style": {
          "fontSize": 16,
          "bold": true,
          "textAlign": "right",
          "htmlTag": "p"
        }
      },
      {
        "type": "text",
        "label": "Footer Text",
        "content": {
          "mode": "tag",
          "tag": "footer_text"
        },
        "style": {
          "fontSize": 12,
          "textAlign": "center",
          "htmlTag": "p"
        },
        "visibility": {
          "tokens": [
            "footer_text"
          ],
          "groupKey": "footer"
        }
      }
    ]
  }
}
