Solid Framework with Solid OCR can be used to access the content of your image file. Solid OCR will scan through the file and reconstruct clean Unicode text, lines, boxes and images, in reading order, and provide the co-ordinates of the file’s elements as well as their color and font attributes (if text).

This sample can export up to two files.

  • A Text file containing the scanned files information
  • A SVG (Scalable Vector Graphics) file

The source code for this sample is provided in the form of a zip file. Solid Framework C++ for Windows SDK is available from the developer portal (self-service).

Steps to Extracting Text from OCR – C++ Sample Application

  1. Download the TextFromOCR.zip (14KB)
  2. Extract the downloaded archive. This creates a TextFromOCR folder with the sample project and an empty SolidFramework folder. The Solid Framework SDK is not included in the sample.
  3. Create a free portal account and generate a Developer SDK license.
  4. Download the Solid Framework C++ for Windows SDK and extract it into the TextFromOCR\SolidFramework folder. Check that this folder now contains the SolidFramework.cppand SolidFramework.h files, and a folder with the correct bitness for your project: Win32 for x86 or Win64 for x64. The placeholder file that comes with the sample can be ignored.
  5. Open TextFromOCRNative.sln in Visual Studio.
  6. Right click on your project and choose Properties
  7. From the Debugging option in the Command Arguments, type in the full file path in this order for the following files:
    • Your Solid Framework license.xml file
    • Your source scanned file
    • The file path and name you want your created .svg file to be created. For example C:\<path_from_extraction>\TextFromOCR\outputSVG.svg
    • The file path and name you want your created .txt file to be created. For example  C:\<path_from_extraction>\TextFromOCR\outputFile.txt.

    Example of the full Command line: TextFromOCR.exe C:\<path_from_extraction>\TextFromOCR\license.xml C:\<path_from_extraction>\TextFromOCR\sample2.tif C:\<path_from_extraction>\TextFromOCR\output.svg C:\<path_from_extraction>\TextFromOCR\outputFile.txt.
    In Command Arguments, enter only the part after TextFromOCR.exe.

  8. Save then Right click on the project and select Rebuild.
  9. Press F5 to run the sample.