Table of Contents
- Overview
- Glossary
- Installation
- Tutorials
- Scenario Steps
- Advanced
- Application
- Screen Data
- Verification
- Clipboard
- Comparison
- Culture
- Data Source
- Date Time
- Driver
- Excel
- FTP
- File
- Flow Control
- Folder
- Format and Conversion
- Keyboard
- Loops
- Math
- Random
- Regex
- Screen
- System
- Text
- User Interface
- Windows Account Information
- Expression Development
- Embedded Development Environment
- Voodoo Connect
- Cross-Browser Scripting (CBS)
- Chrome Extension
- Firefox Extension
- Notification Center
- Unified Console
- Wrapper Libraries
- Database
- Troubleshooting
- 3rd Party Tool
Voodoo OCR Wrapper Library
Voodoo RPA EDEnvrionment enables the user to develop and integrate everything into their robotic process automation projects. The Voodoo Native OCR Wrapper can be used in EDE environment and provides a single point of contact for OCR works. Below is a sample EDE design to OCR image set to return into Voodoo Data Storage.
To use, you add this OCRLoader library into Voodoo File References in EDE. Also you need Newtonsoft.Json library to deserialize JSON responses.
namespace VoodooImplementation { using System; using VooDooCommonData.CommonInterface; using VooDooCommonData.InstanceData; using OCRLoader; using Newtonsoft.Json; public class ComputationEvaluator : System.MarshalByRefObject, IPlugInComputation { private bool result_; private VooDooCommonData.InstanceData.PlanDataInstanceManager planDataInstanceManager_; public ComputationEvaluator() { } public bool result { get { return result_; } } public virtual VooDooCommonData.InstanceData.PlanDataInstanceManager planDataInstanceManager { get { return planDataInstanceManager_; } set { planDataInstanceManager_ = value; } } public virtual void ExecuteComputation() { OCR OCRObj = new OCR(); string text = OCRObj.ocrSpace(@"C:\Users\oz\Desktop\simple-text-captcha.png", "helloworld"); dynamic stuff = JsonConvert.DeserializeObject(text); string captcha = stuff.ParsedResults[0]["ParsedText"]; string mcaptcha = captcha.Replace(" ", "").Trim(); /* This Code Is Not Important. Just Set Return OCR Resut Into Voodoo Data Storage*/ planDataInstanceManager_.SetDataTableValueFromCurrentDataRowIndex(4,"search", "Voodoo"); planDataInstanceManager_.SetDataTableValueFromCurrentDataRowIndex(4,"captcha", mcaptcha); result_ = true; } } }
Attention!
Microsoft.CSharp.dll contains the dynamic portion of the C# compiler. Any time you use dynamic in your code, you need a reference to it! To add, open Framework References window from EDE -> Kod Ribon -> References -> Framework Refences and Add Microsoft.CSharp.dll, then save.
OCR Class
Methods
Property | Description |
---|---|
string ocrSpace(string path, string apikey, string isOverlayRequired) |
OCR given local image and return result as JSON string.
path: Local file path to be OCR. That file can jpg, png or pdf apikey: Ocr.space api key. You can apply https://ocr.space/OCRAPI isOverlayRequired: That is a boolean value (true/false). Default = false If true, returns the coordinates of the bounding boxes for each word. If false, the OCR’ed text is returned only as a text block (this makes the JSON reponse smaller)
|