Link Search Menu Expand Document

Table Multiple pages - Approach 1 - Detect Columns Automatically - TEMPLATES-SAMPLES

Document Parser sample in TEMPLATES-SAMPLES demonstrating ‘Table Multiple pages - Approach 1 - Detect Columns Automatically’

Multi-page table - Approach 1 - Detect Columns Automatically.json
{
  "templateName": "Multi-page table - Approach 1 - Detect Columns Automatically",
  "templateVersion": 4,
  "templatePriority": 0,
  "objects": [
    {
      "name": "total",
      "objectType": "field",
      "fieldProperties": {
        "fieldType": "macros",
        "expression": "TOTAL{{Spaces}}({{Number}})",
        "regex": true,
        "dataType": "decimal"
      },
      "id": 1634132995054
    },
    {
      "name": "table1",
      "objectType": "table",
      "tableProperties": {
        "start": {
          "expression": "Item{{Spaces}}Description{{Spaces}}Price",
          "regex": true
        },
        "end": {
          "expression": "TOTAL{{Spaces}}{{Number}}",
          "regex": true
        },
        "row": {
          "expression": "{{LineStart}}{{Spaces}}(?<itemNo>{{Digits}}){{Spaces}}(?<description>{{SentenceWithSingleSpaces}}){{Spaces}}(?<price>{{Number}}){{Spaces}}(?<qty>{{Digits}}){{Spaces}}(?<extPrice>{{Number}})",
          "regex": true
        },
        "columns": [
          {
            "name": "itemNo",
            "dataType": "integer"
          },
          {
            "name": "description",
            "dataType": "string"
          },
          {
            "name": "price",
            "dataType": "decimal"
          },
          {
            "name": "qty",
            "dataType": "integer"
          },
          {
            "name": "extPrice",
            "dataType": "decimal"
          }
        ],
        "multipage": true
      },
      "id": 1634132995055
    }
  ]
}

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