How to test processFields API method of Cloud OCR SDK via ConsoleTest (.NET Code sample)


How can I test the Cloud OCR SDK processFields API method (or any other)?


You can use the ConsoleTest solution shipped with C# Code Sample

Step-by-step guide:

  1. Download .NET Code sample Make sure you have Microsoft Visual Studio 2008 or later version with C# enabled. If you don’t have any, you can download and install Visual C# Express, it's free.
  2. Provide your Cloud OCR SDK credentials. For that please change Test.cs, class Test constructor
  3. Customize the URL for HTML requests. To do this open the General/GuiTest/app.config file and set the value tag of the ServerAddress setting according to the processing location. For example, for processing data in Europe, set the value as the following:
    <setting name="ServerAddress" serializeAs="String"> 
    <value></value> </setting>
  4. Open the solution file Abbyy.CloudOcrSdk.sln in Visual Studio. Upgrade project if necessary.
  5. Set ConsoleTest as a StartUp project.
  6. Run the project
  7. Go dotNet\General\ConsoleTest\bin\Debug 
  8. Type cmd inside File Path line, press Enter
  9.  Type in ConsoleTest.exe and press Enter to see the available options/commands
  10. For processFields method use --asFields command. Make sure to preliminary create the XML file which will hold the processing settings(see example below). The description of XML tags is here
    Other mandatory operands for this command: the path to Input(source) file and the path to the Output directory.

Example of the XML file with processing settings()

<?xml version="1.0" encoding="utf-8"?>
<document xmlns=""
<text id="numbers" bottom="0" left="0" right="0" top="0">
<barcode bottom="0" id="cmc7">
<page applyTo="0">
<text template="numbers" id="amount" left="900" top="220" right="1100" bottom="327" />

Related articles

Have more questions? Submit a request



Please sign in to leave a comment.

Recently viewed