Programming languages: C# quick start guide

In the Code Samples section you can find the Visual C# sample, which will help you to start development with Cloud OCR SDK.

Please note that to use ABBYY Cloud OCR SDK you need to be registered. You can register here. After registration you will receive login and password for Cloud OCR SDK site and will be able to create Application ID and Application Password for each of your applications. This ID and Password are required by server for each request. For more details see Authentication.

To use this sample, you’ll need 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.

  1. Download the code sample and unzip it.
  2. 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 following:
    <setting name="ServerAddress" serializeAs="String"> 
    <value></value> </setting>
  3. Open the solution file Abbyy.CloudOcrSdk.sln in Visual Studio. Upgrade project if necessary.
    Upgrade project
  4. Set GuiTest as a StartUp project.
    Set as StartUp project
  5. Run project.
    Start Debugging
  6. A new window with prompt for your Application ID and application password will appear. Enter your Application ID and the password you received in e-mail for this Application ID.
    Authentication data
    The data you enter will be saved for future use in application’s settings file.
  7. Then you will see the main application window:
    Main window
    Now you can try to perform recognition. You can recognize any image from the test set provided by ABBYY or use your own one.
  8. Set the recognition language for the image you are going to recognize and choose the output format by clicking the appropriate buttons at the bottom of left panel.
    Recognition settings
    If you select Business card or Document with MRZ, the available export formats will be limited (to XML and VCard or only XML, respectively).
  9. Drag the selected file onto the left panel. A new task will appear.
    New task
    After the upload finishes, it will receive a task id. The program will periodically check the status of the task and wait until it finishes.
    Task with Processing status
  10. After the image is processed and downloaded, you can view it by double-clicking on its line in the right panel.
    Processed task
    Output pdf
  11. Now you can start modifying the samples to fit your needs. Take a look at smaller command-line example ConsoleTest/Test.cs. The initialization procedure can be found in the Test() constructor, and the file processing is implemented in the ProcessFile function.

Have more questions? Submit a request



Please sign in to leave a comment.