ByteScout Data Extraction Suite - VB.NET - Batch check folder agianst json settings with pdf extractor sdk - 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 Data Extraction Suite – VB.NET – Batch check folder agianst json settings with pdf extractor sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Data Extraction Suite – VB.NET – Batch check folder agianst json settings with pdf extractor sdk

batch check folder agianst json settings with pdf extractor sdk in VB.NET with ByteScout Data Extraction Suite

Learn to code in VB.NET to make batch check folder agianst json settings with pdf extractor sdk with this simple How-To tutorial

These source code samples are assembled by their programming language and functions they use. ByteScout Data Extraction Suite helps with batch check folder agianst json settings with pdf extractor sdk in VB.NET. ByteScout Data Extraction Suite is the set that includes 3 SDK products for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK.

VB.NET code snippet like this for ByteScout Data Extraction Suite works best when you need to quickly implement batch check folder agianst json settings with pdf extractor sdk in your VB.NET application. Follow the steps-by-step instructions from the scratch to work and copy and paste code for VB.NET into your editor. This basic programming language sample code for VB.NET will do the whole work for you in implementing batch check folder agianst json settings with pdf extractor sdk in your app.

ByteScout Data Extraction Suite free trial version is available for download from our website. Free trial also includes 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)

Program.vb
      
Imports Bytescout.PDFExtractor Imports System.IO Imports Newtonsoft.Json Class Program Friend Shared Sub Main(args As String()) Try ' Get all settings VM Dim allSettings As SettingsVM = GetSettingsVM("settings.json") ' Create Bytescout.PDFExtractor.TextExtractor instance Dim extractor As New TextExtractor() extractor.RegistrationName = "demo" extractor.RegistrationKey = "demo" For Each fileName As String In Directory.GetFiles("InputFiles") ' Load sample PDF document extractor.LoadDocumentFromFile(fileName) ' Enable regex search extractor.RegexSearch = True ' Get Number of pages PDF contains Dim pageCount As Int32 = extractor.GetPageCount() For iPage As Int32 = 0 To pageCount - 1 ' Loop through all search settings For Each itmSearchSetting As Settings In allSettings.Settings ' If found, then copy file to sub-category folder If extractor.Find(iPage, itmSearchSetting.regex, False) Then ' If Directory does Not exists, then create them If (Not Directory.Exists({code}quot;{allSettings.MainFolderName}/{itmSearchSetting.category}")) Then Directory.CreateDirectory({code}quot;{allSettings.MainFolderName}/{itmSearchSetting.category}") End If ' Copy File File.Copy(fileName, {code}quot;{allSettings.MainFolderName}/{itmSearchSetting.category}/{Path.GetFileName(fileName)}", True) End If Next Next Next ' Cleanup extractor.Dispose() Catch ex As Exception Console.WriteLine("Error: " + ex.Message) End Try Console.WriteLine() Console.WriteLine("Press any key to continue...") Console.ReadLine() End Sub Shared Function GetSettingsVM(ByVal settingsFileName As String) As SettingsVM Dim allJson As String = File.ReadAllText(settingsFileName) Return JsonConvert.DeserializeObject(Of SettingsVM)(allJson) End Function End Class

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

SettingsVM.vb
      
Imports System.Collections.Generic Public Class SettingsVM Public MainFolderName As String Public Settings As List(Of Settings) End Class Public Class Settings Public category As String Public regex As String End Class

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

packages.config
      
<?xml version="1.0" encoding="utf-8"?> <packages> <package id="Newtonsoft.Json" version="12.0.2" targetFramework="net40" /> </packages>

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite 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 Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next