Link Search Menu Expand Document

Invoice Get Total And Tax - TEMPLATES-SAMPLES

Document Parser sample in TEMPLATES-SAMPLES demonstrating ‘Invoice Get Total And Tax’

sampleTemplate.json
{
  "templateVersion": 4,
  "templatePriority": 0,
  "culture": "en-US",
  "objects": [
    {
      "id": 0,
      "objectType": "field",
      "name": "Invoice No",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "Invoice{{Spaces}}{{Number}}",
        "dataType": "integer",
        "regex": true
      }
    },
    {
      "id": 1,
      "objectType": "field",
      "name": "Invoice Date",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "DATE{{Anything}}(?<value>{{SmartDate}})",
        "dataType": "date",
        "regex": true,
        "dateFormat": "auto-ymd"
      }
    },
    {
      "id": 2,
      "objectType": "field",
      "name": "Sub Total",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "SUB TOTAL:{{Spaces}}(?<value>{{Money}})",
        "dataType": "string",
        "regex": true
      }
    },
    {
      "id": 3,
      "objectType": "field",
      "name": "Tax",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "VAT{{Anything}}(?<value>{{Money}})",
        "dataType": "string",
        "regex": true
      }
    },
    {
      "id": 4,
      "objectType": "field",
      "name": "Total",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "{{LineStart}}{{Spaces}}TOTAL:{{Spaces}}(?<value>{{Money}})",
        "dataType": "string",
        "regex": true
      }
    }
  ],
  "oldObjects": [
    {
      "id": 0,
      "objectType": "field",
      "name": "Invoice No",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "Invoice{{Spaces}}{{Number}}",
        "dataType": "integer",
        "regex": true
      }
    },
    {
      "id": 1,
      "objectType": "field",
      "name": "Invoice Date",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "DATE{{Anything}}(?<value>{{SmartDate}})",
        "dataType": "date",
        "regex": true,
        "dateFormat": "auto-ymd"
      }
    },
    {
      "id": 2,
      "objectType": "field",
      "name": "Sub Total",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "SUB TOTAL:{{Spaces}}(?<value>{{Money}})",
        "dataType": "string",
        "regex": true
      }
    },
    {
      "id": 3,
      "objectType": "field",
      "name": "Tax",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "VAT{{S}}(?<value>{{Money}})",
        "dataType": "string",
        "regex": true
      }
    },
    {
      "id": 4,
      "objectType": "field",
      "name": "Total",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "{{LineStart}}{{Spaces}}TOTAL:{{Spaces}}(?<value>{{Money}})",
        "dataType": "string",
        "regex": true
      }
    }
  ],
  "templateName": "",
  "description": "",
  "options": {
    "ocrMode": "auto",
    "ocrLanguage": "eng",
    "ocrResolution": 300,
    "ocrImageFilters": "",
    "ocrWhiteList": "",
    "ocrBlackList": ""
  }
}

PDF.co Web API: the Web API with a set of tools for documents manipulation, data conversion, data extraction, splitting and merging of documents. Includes image recognition, built-in OCR, barcode generation and barcode decoders to decode bar codes from scans, pictures and pdf.

Get your PDF.co API key here!

Download Source Code (.zip)

return to the previous page explore Document Parser endpoint