Extract Text from Images in Ruby web apps using Aspose.OCR Cloud SDK for Ruby

Aspose.OCR Cloud

Aspose.OCR Cloud is a cloud-based REST API for optical character recognition and document scanning. It allows you to scan documents and recognize characters. Recognize text in English and other languages, and recognize text in only part of an image. Aspose.OCR Cloud supports a variety of fonts in different styles, like regular, bold, and italic, and different image formats. You can use Aspose.OCR Cloud in many scenarios, for example, extracting text and saving to a database.


You can install Aspose OCR Cloud SDK with RubyGem:
gem install aspose_ocr_cloud

Source files

This SDK is open source and available on GitHub and CodePlex.


APIs of this SDK can be called as follows:
require 'aspose_ocr_cloud'

class OCRUsage

  include AsposeOCRCloud
  include AsposeStorageCloud

  def initialize
    #Get App key and App SID from https://cloud.aspose.com
    AsposeApp.app_key_and_sid("APP_KEY", "APP_SID")
    @ocr_api = OcrApi.new  

  def upload_file(file_name)
    @storage_api = StorageApi.new
    response = @storage_api.put_create(file_name, File.open("data/" << file_name,"r") { |io| io.read } )

  def get_recognize_document
    #Recognize image text, language and text region can be selected, default dictionaries can be used for correction.
    file_name = "Sampleocr.bmp"

    response = @ocr_api.get_recognize_document(file_name)


Aspose.OCR Cloud SDK Examples

Programmer’s Guide, a complete manual on programming with Aspose.OCR Cloud APIs. It holds the wealth of features with sample codes and capabilities.

Unit Tests

To help you get started we also provided unit test coverage to Aspose.OCR APIs.

Start a Free Trial Today

Start a free trial today – all you need is to sign up with Aspose Cloud service. Once you have signed up, you are ready to try powerful file processing features offered by Aspose Cloud.