ByteScout Cloud API Server - Document Parser API - cURL - Document Parser Custom Template Code - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Cloud API Server – Document Parser API – cURL – Document Parser Custom Template Code

  • Home
  • /
  • Articles
  • /
  • ByteScout Cloud API Server – Document Parser API – cURL – Document Parser Custom Template Code

document parser API in cURL using ByteScout Cloud API Server

ByteScout Cloud API Server is the ready to use Web API Server that can be deployed in less than 30 minutes into your own in-house server or into private cloud server. Can store data on in-house local server based storage or in Amazon AWS S3 bucket. Processing data solely on the server using buil-in ByteScout powered engine, no cloud services are used to process your data!.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

DocumentParserCustomTemplateCode.cmd

      
# Please NOTE: In this sample we're assuming Cloud Api Server is hosted at "https://localhost". # If it's not then please replace this with with your hosting url. curl --location --request POST 'https://localhost/pdf/documentparser' \ --header 'Content-Type: application/json' \ --header 'x-api-key: {{x-api-key}}' \ --data-raw '{ "url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/MultiPageTable.pdf", "template": "---\r\n# Template that demonstrates parsing of multi-page table using only\r\n# regular expressions for the table start, end, and rows.\r\n# If regular expression cannot be written for every table row (for example,\r\n# if the table contains empty cells), try the second method demonstrated\r\n# in `MultiPageTable-template2.yml` template.\r\ntemplateVersion: 3\r\ntemplatePriority: 0\r\nsourceId: Multipage Table Test\r\ndetectionRules:\r\n keywords:\r\n - Sample document with multi-page table\r\nfields:\r\n total:\r\n type: regex\r\n expression: TOTAL {{DECIMAL}}\r\n dataType: decimal\r\ntables:\r\n- name: table1\r\n start:\r\n # regular expression to find the table start in document\r\n expression: Item\\s+Description\\s+Price\\s+Qty\\s+Extended Price\r\n end:\r\n # regular expression to find the table end in document\r\n expression: TOTAL\\s+\\d+\\.\\d\\d\r\n row:\r\n # regular expression to find table rows\r\n expression: '\''^\\s*(?<itemNo>\\d+)\\s+(?<description>.+?)\\s+(?<price>\\d+\\.\\d\\d)\\s+(?<qty>\\d+)\\s+(?<extPrice>\\d+\\.\\d\\d)'\''\r\n columns:\r\n - name: itemNo\r\n type: integer\r\n - name: description\r\n type: string\r\n - name: price\r\n type: decimal\r\n - name: qty\r\n type: integer\r\n - name: extPrice\r\n type: decimal\r\n multipage: true", "outputFormat": "JSON", "async": false, "encrypt": "false", "inline": "true", "profiles": "", "password": "", "storeResult": false }'

VIDEO

ON-PREMISE OFFLINE SDK

Get 60 Day Free Trial

See also:

ON-DEMAND REST WEB API

Get Your API Key

See also:

Tutorials:

prev
next