ByteScout PDF Extractor SDK - VBScript - OCR With Best Dataset - ByteScout

ByteScout PDF Extractor SDK – VBScript – OCR With Best Dataset

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – VBScript – OCR With Best Dataset

OCR with best dataset in VBScript with ByteScout PDF Extractor SDK

Write code in VBScript to make OCR with best dataset with this How-To tutorial

Every ByteScout tool contains example VBScript source codes that you can find here or in the folder with installed ByteScout product. OCR with best dataset in VBScript 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.

VBScript, code samples for VBScript, developers help to speed up the application development and writing a code when using ByteScout PDF Extractor SDK. Follow the instruction from the scratch to work and copy and paste code for VBScript into your editor. Enjoy writing a code with ready-to-use sample VBScript codes to implement OCR with best dataset using ByteScout PDF Extractor SDK.

Visit our website provides for free trial version of ByteScout PDF Extractor SDK. Free trial includes lots of source code samples to help you with your VBScript project.

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

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

ExtractTextFromImageOrScannedPdfUsingBestOcrDataset.vbs
      
' This example demonstrates the use of Optical Character Recognition (OCR) to extract text ' from scanned PDF documents and raster images. ' Create TextExtractor object Set extractor = CreateObject("Bytescout.PDFExtractor.TextExtractor") extractor.RegistrationName = "demo" extractor.RegistrationKey = "demo" ' Load sample PDF document extractor.LoadDocumentFromFile("..\..\sample_ocr.pdf") ' Enable Optical Character Recognition (OCR) extractor.OCRMode = 1 ' OCRMode.Auto = 1 ' Set the location of OCR language data files extractor.OCRLanguageDataFolder = "c:\Program Files\Bytescout PDF Extractor SDK\ocrdata_best" ' Set OCR language ' "eng" for english, "deu" for German, "fra" for French, "spa" for Spanish etc - according to files in "ocrdata" folder. extractor.OCRLanguage = "eng" ' Find more language files at https://github.com/bytescout/ocrdata/tree/master/ocrdata_best ' Set PDF document rendering resolution extractor.OCRResolution = 300 ' You can also apply various preprocessing filters to improve the recognition on low-quality scans. ' But they significantly hit the performance, so do not enable them by default. ' Automatically deskew skewed scans 'extractor.OCRImagePreprocessingFilters.AddDeskew() ' Remove vertical or horizontal lines (sometimes helps to avoid OCR engine's page segmentation errors) 'extractor.OCRImagePreprocessingFilters.AddVerticalLinesRemover() 'extractor.OCRImagePreprocessingFilters.AddHorizontalLinesRemover() ' Repair broken letters 'extractor.OCRImagePreprocessingFilters.AddDilate() ' Remove noise 'extractor.OCRImagePreprocessingFilters.AddMedian() ' Apply Gamma Correction 'extractor.OCRImagePreprocessingFilters.AddGammaCorrection() ' Add Contrast ' extractor.OCRImagePreprocessingFilters.AddContrast(20) ' (!) You can use new OCRAnalyzer class to find an optimal set of image preprocessing ' filters for your specific document. ' See "OCR Analyser" example. ' Save extracted text to file extractor.SaveTextToFile("output.txt") WScript.Echo "Extracted text saved as 'output.txt'." Set extractor = Nothing

ON-PREMISE OFFLINE SDK

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

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 PDF Extractor SDK Home Page

Explore ByteScout PDF Extractor SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Extractor SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next