ByteScout PDF Suite - VBScript - Ocr analyser for pdf 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 PDF Suite – VBScript – Ocr analyser for pdf with pdf extractor sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Suite – VBScript – Ocr analyser for pdf with pdf extractor sdk

ocr analyser for pdf with pdf extractor sdk in VBScript and ByteScout PDF Suite

How to apply ByteScout PDF Suite for ocr analyser for pdf with pdf extractor sdk in VBScript

Every ByteScout tool includes sampleVBScript source codes that you can find here or in the folder with installed ByteScout product. ByteScout PDF Suite was created to assist ocr analyser for pdf with pdf extractor sdk in VBScript. ByteScout PDF Suite is the bundle that provides six different SDK libraries to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript.

Save time on writing and testing code by using the code below and use it in your application. If you want to implement this functionality, you should copy and paste code below into your app using code editor. Then compile and run your application. VBScript 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.

ByteScout PDF Suite is available as a free trial. You may get it from our website along with all other source code samples for VBScript applications.

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

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

PerformOcrAnalysisAndExtractText.vbs
      
' This example demonstrates the use of OCR Analyser - a tooling class for analysis of scanned documents ' in PDF or raster image formats to find best parameters for Optical Character Recognition (OCR) that ' provide highest recognition quality. ' Input document inputDocument = "..\..\sample_ocr.pdf" ' Document page index pageIndex = 0 ' Location of OCR language data files ocrLanguageDataFolder = "c:\Program Files\Bytescout PDF Extractor SDK\ocrdata_best\" ' OCR language ocrLanguage = "eng" ' "eng" for english, "deu" for German, "fra" for French, "spa" for Spanish etc - according to files in "ocrdata" folder ' Find more language files at https://github.com/bytescout/ocrdata ' Create OCRAnalyzer object and activate it with your registration information Set ocrAnalyzer = CreateObject("Bytescout.PDFExtractor.OCRAnalyzer") ocrAnalyzer.RegistrationName = "demo" ocrAnalyzer.RegistrationKey = "demo" ' Load document to OCRAnalyzer ocrAnalyzer.LoadDocumentFromFile(inputDocument) ' Setup OCRAnalyzer ocrAnalyzer.OCRLanguage = ocrLanguage ocrAnalyzer.OCRLanguageDataFolder = ocrLanguageDataFolder WScript.Echo "Starting the OCR analysis. Click OK and wait, it may last long." & outputDocument ' Perform analysis and get results Set analysisResults = ocrAnalyzer.AnalyzeByOCRConfidence(pageIndex) ' Now extract page text using detected OCR parameters outputDocument = ".\result.txt" ' Create TextExtractor object Set textExtractor = CreateObject("Bytescout.PDFExtractor.TextExtractor") textExtractor.RegistrationName = "demo" textExtractor.RegistrationKey = "demo" ' Load document to TextExtractor textExtractor.LoadDocumentFromFile(inputDocument) ' Setup TextExtractor textExtractor.OCRMode = 1 ' OCRMode.Auto textExtractor.OCRLanguageDataFolder = ocrLanguageDataFolder textExtractor.OCRLanguage = ocrLanguage ' Apply analysys results to TextExtractor instance ocrAnalyzer.ApplyResults (analysisResults), (textExtractor) ' Save extracted text to file textExtractor.SaveTextToFile(outputDocument) WScript.Echo "Extracted text saved to " & outputDocument Set textExtractor = Nothing Set ocrAnalyzer = Nothing

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

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

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next