Total and Vat tax - TEMPLATES-SAMPLES
Document Parser sample in TEMPLATES-SAMPLES demonstrating ‘Total and Vat 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.
Download Source Code (.zip)
return to the previous page explore Document Parser endpoint
Copyright © 2016 - 2023 PDF.co