ByteScout PDF Extractor SDK - VB.NET - Batch check folder agianst JSON settings - ByteScout

ByteScout PDF Extractor SDK – VB.NET – Batch check folder agianst JSON settings

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – VB.NET – Batch check folder agianst JSON settings

batch check folder agianst JSON settings in VB.NET using ByteScout PDF Extractor SDK

How to use ByteScout PDF Extractor SDK for batch check folder agianst JSON settings in VB.NET

Source code documentation samples provide quick and easy way to add a required functionality into your application. Batch check folder agianst JSON settings in VB.NET can be implemented with ByteScout PDF Extractor SDK. ByteScout PDF Extractor SDK is the SDK that helps developers to extract data from unstructured documents, pdf, images, scanned and electronic forms. Includes AI functions like automatic table detection, automatic table extraction and restructuring, text recognition and text restoration from pdf and scanned documents. Includes PDF to CSV, PDF to XML, PDF to JSON, PDF to searchable PDF functions as well as methods for low level data extraction.

VB.NET code snippet like this for ByteScout PDF Extractor SDK works best when you need to quickly implement batch check folder agianst JSON settings in your VB.NET application. This VB.NET sample code should be copied and pasted into your application’s code editor. Then just compile and run it to see how it works. Enjoy writing a code with ready-to-use sample VB.NET codes to add batch check folder agianst JSON settings functions using ByteScout PDF Extractor SDK in VB.NET.

Our website provides free trial version of ByteScout PDF Extractor SDK. It comes along with all these source code samples with the goal to help you with your VB.NET application implementation.

Try ByteScout PDF Extractor SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

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

Try ByteScout PDF Extractor SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

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

Try ByteScout PDF Extractor SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

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

Try ByteScout PDF Extractor SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

VIDEO

ON-PREMISE VERSION INFORMATION

Get 60 Day Free Trial or Visit ByteScout PDF Extractor SDK Home Page

Explore ByteScout PDF Extractor SDK Documentation

Get ByteScout PDF Extractor SDK Free Training

WEB API

Get Your Free API Key

Explore Web API Documentation

Tutorials:

prev
next