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.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
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
60 Day Free Trial or Visit ByteScout PDF Extractor SDK Home Page
Explore ByteScout PDF Extractor SDK Documentation
Explore Samples
Sign Up for ByteScout PDF Extractor SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
60 Day Free Trial or Visit ByteScout PDF Extractor SDK Home Page
Explore ByteScout PDF Extractor SDK Documentation
Explore Samples
Sign Up for ByteScout PDF Extractor SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net40" />
</packages>
60 Day Free Trial or Visit ByteScout PDF Extractor SDK Home Page
Explore ByteScout PDF Extractor SDK Documentation
Explore Samples
Sign Up for ByteScout PDF Extractor SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout PDF Extractor SDK Home Page
Explore ByteScout PDF Extractor SDK Documentation
Explore Samples
Sign Up for ByteScout PDF Extractor SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: