Link Search Menu Expand Document

Table Without Borders Auto Detection - TEMPLATES-SAMPLES

Document Parser sample in TEMPLATES-SAMPLES demonstrating ‘Table Without Borders Auto Detection’

template.json
{
  "templateVersion": 4,
  "templatePriority": 0,
  "culture": "en-US",
  "objects": [
    {
      "id": 1657705327279,
      "objectType": "field",
      "name": "Company Name",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "$$funcFindCompany",
        "dataType": "string"
      }
    },
    {
      "id": 1657705404665,
      "objectType": "field",
      "name": "Invoice No",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "Invoice No:{{Spaces}}(?<value>{{Digits}})",
        "dataType": "string",
        "regex": true
      }
    },
    {
      "id": 1657705435538,
      "objectType": "field",
      "name": "Date",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "Date:{{Spaces}}(?<value>{{SmartDate}})",
        "dataType": "string",
        "regex": true
      }
    },
    {
      "id": 1657705488574,
      "objectType": "field",
      "name": "Total Due",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "TOTAL DUE{{Spaces}}{{Dollar}}(?<value>{{Number}})",
        "dataType": "string",
        "regex": true
      }
    },
    {
      "id": 1657705629768,
      "objectType": "table",
      "tableType": "searchBased",
      "name": "Table Items",
      "tableProperties": {
        "autoDetection": {
          "tableIndex": 0,
          "pageIndex": 0
        },
        "columns": [
          {
            "name": "Column1",
            "dataType": "string"
          },
          {
            "name": "Column2",
            "dataType": "string"
          },
          {
            "name": "Column3",
            "dataType": "string"
          }
        ],
        "filters": [
          {
            "action": "exclude",
            "expression": "TOTAL DUE",
            "regex": true
          }
        ]
      }
    }
  ],
  "oldObjects": [
    {
      "id": 1657705327279,
      "objectType": "field",
      "name": "Company Name",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "$$funcFindCompany",
        "dataType": "string"
      }
    },
    {
      "id": 1657705404665,
      "objectType": "field",
      "name": "Invoice No",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "Invoice No:{{Spaces}}(?<value>{{Digits}})",
        "dataType": "string",
        "regex": true
      }
    },
    {
      "id": 1657705435538,
      "objectType": "field",
      "name": "Date",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "Date:{{Spaces}}(?<value>{{SmartDate}})",
        "dataType": "string",
        "regex": true
      }
    },
    {
      "id": 1657705488574,
      "objectType": "field",
      "name": "Total Due",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "TOTAL DUE{{Spaces}}{{Dollar}}(?<value>{{Number}})",
        "dataType": "string",
        "regex": true
      }
    },
    {
      "id": 1657705629768,
      "objectType": "table",
      "tableType": "searchBased",
      "name": "Table Items",
      "tableProperties": {
        "autoDetection": {
          "tableIndex": 0,
          "pageIndex": 0
        },
        "columns": [
          {
            "name": "Column1",
            "dataType": "string"
          },
          {
            "name": "Column2",
            "dataType": "string"
          },
          {
            "name": "Column3",
            "dataType": "string"
          }
        ],
        "filters": [
          {
            "action": "exclude",
            "expression": "TOTAL DU",
            "regex": true
          }
        ]
      }
    }
  ],
  "templateName": "Automatically find borderless table",
  "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