ByteScout Document Parser SDK - VBScript and VB6 - Create Custom Template - 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 Document Parser SDK – VBScript and VB6 – Create Custom Template

  • Home
  • /
  • Articles
  • /
  • ByteScout Document Parser SDK – VBScript and VB6 – Create Custom Template

How to create custom template in VBScript and VB6 with ByteScout Document Parser SDK

Write code in VBScript and VB6 to create custom template with this step-by-step tutorial

We made thousands of pre-made source code pieces for easy implementation in your own programming projects. Want to create custom template in your VBScript and VB6 app? ByteScout Document Parser SDK is designed for it. ByteScout Document Parser SDK is the template based data extraction engine can process thousands and millions of documents per day based on templates. Can work online and offline for privacy focused tasks. Templates can be supported and updated without any programming or technical knowledge required. Output is generated in JSON, CSV, XML and custom format if required.

This code snippet below for ByteScout Document Parser SDK works best when you need to quickly create custom template in your VBScript and VB6 application. In your VBScript and VB6 project or application you may simply copy & paste the code and then run your app! Code testing will allow the function to be tested and work properly with your data.

ByteScout free trial version is available for download from our website. It includes all these programming tutorials along with source code samples.

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

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

CustomTemplate.vbs
      
' This example demonstrates data parsing from an invoice using the custom template. customTemplate = ".\SampleTemplate.yml" inputDocument = ".\SampleInvoice.pdf" ' Create DocumentParser object Set documentParser = CreateObject("Bytescout.DocumentParser.DocumentParser") documentParser.RegistrationName = "demo" documentParser.RegistrationKey = "demo" ' Load custom template documentParser.AddTemplate customTemplate ' Parse invoice data in JSON format documentParser.ParseDocument inputDocument, "output1.json", 0 ' 0 = OutputFormat.JSON WScript.Echo "Parsed data saved as 'output1.json'." Set documentParser = Nothing

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Document Parser SDK Home Page

Explore ByteScout Document Parser SDK Documentation

Explore Samples

Sign Up for ByteScout Document Parser SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

SampleTemplate.yml
      
--- templateVersion: 1 sourceId: My Custom Template detectionRules: # Few regex expressions uniquely identifying the document design. # Don't forget to escape special characters. keywords: - Your Company Name - Invoice No\. - TOTAL # Expressions to extract distinct fields. # Last matching group or "<value>" group will be passed to result. fields: total: expression: TOTAL\s+(\d+\.\d+) type: decimal dateIssued: expression: Invoice Date (\d{2}/\d{2}/\d{4}) # If type is dateTime and dateFormat property is specified # the date will be converted to universal time by the specified format. type: dateTime dateFormat: MM/dd/yyyy invoiceId: expression: Invoice No. (\d+) # Static field that will be passed to result unchanged. sourceName: expression: Vendor Company static: true # Couple of fixed rectangular fields. # You can use "Template Editor" application to add them with ease. billTo: # Rectangle coordinates sequence: x, y, width, height. rect: - 32.25 - 150 - 348 - 70.5 notes: rect: - 32.25 - 227.25 - 531 - 47.25 # Optional page index parameter (zero-based) if you need to extract from specific page. pageIndex: 0 # Table data extraction. tables: - name: table1 start: # Table start after header row "Item Quantity Price Total". expression: Item\s+Quantity\s+Price\s+Total end: # Table rows last until "TOTAL" keyword. expression: TOTAL row: # Regex for table rows extraction. expression: ^\s*(?<description>\w+.*)(?<quantity>\d+)\s+(?<unitPrice>\d+\.\d{2})\s+(?<itemTotal>\d+\.\d{2})\s*$ types: # Column datatypes. Names correspond to regex matching groups. unitPrice: decimal itemTotal: decimal options: # multipage - set 'true' if table data can continue on following pages. multipage: false

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Document Parser SDK Home Page

Explore ByteScout Document Parser SDK Documentation

Explore Samples

Sign Up for ByteScout Document Parser SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Document Parser SDK Home Page

Explore ByteScout Document Parser SDK Documentation

Explore Samples

Sign Up for ByteScout Document Parser SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next