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

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium 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 and ByteScout Premium Suite

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

Every ByteScout tool includes sampleVB.NET source codes that you can find here or in the folder with installed ByteScout product. ByteScout Premium Suite was made to help with batch check folder agianst json settings with pdf extractor sdk in VB.NET. ByteScout Premium Suite is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording.

Save time on writing and testing code by using the code below and use it in your application. To use batch check folder agianst json settings with pdf extractor sdk in your VB.NET project or application just copy & paste the code and then run your app! VB.NET application implementation mostly involves various stages of the software development so even if the functionality works please check it with your data and the production environment.

If you want to try other samples for VB.NET then free trial version of ByteScout Premium Suite is available on our website.

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 Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

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

Explore ByteScout Premium Suite Documentation

Explore Samples

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

Explore ByteScout Premium Suite Documentation

Explore Samples

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

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next