2017 © Pedro Peláez
 

library ocrwebservice

A wrapper for ocrwebservice.com

image

vluzrmos/ocrwebservice

A wrapper for ocrwebservice.com

  • Tuesday, March 29, 2016
  • by vluzrmos
  • Repository
  • 0 Watchers
  • 1 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 25 % Grown

The README.md

OCRWebService

This package is a wrapper for http://www.ocrwebservice.com/api/restguide., (*1)

Installation

composer require vluzrmos/ocrwebservice

Usage

You should have an account with a trial or other subscription plan to use that package., (*2)

Getting Account Information

/*
 * USERNAME and LICENSE_KEY are strings, and both are provided by ocrwebservice.com.
 */
$ocr = new OCRWebService\OCRWebService(USERNAME, LICENSE_KEY);
$account = $ocr->getAccountInformation();

/*
 Returns an object AccountInformation which has a method ->toArray():
 [                                                  
   "AvailablePages" => 22,                          
   "MaxPages" => 25,                                
   "ExpirationDate" => "04/29/2016",                
   "LastProcessingTime" => "3/29/2016 10:42:13 AM", 
   "SubcriptionPlan" => "TRIAL",                    
   "ErrorMessage" => "",                            
 ]                                                  
*/

$account->getAvailablePages();
$account->getMaxPages();
//...

$account->availablePages; //same of getAvailablePages() method;
//...

Processing a Document

/*
 * USERNAME and LICENSE_KEY are strings, and both are provided by ocrwebservice.com.
 */
$ocr = new OCRWebService\OCRWebService(USERNAME, LICENSE_KEY);

$document = $ocr->processDocument($pathToPdfOrImage, [
    'gettext' => 'true',
    'pagerange' => 'allpages',
    'language' => 'brazilian'
]);

//all options like described in http://www.ocrwebservice.com/api/restguide

// $document will be an instance of ProcessDocument, with that following methods:

$document->getOCRText(); //return ocr 
$document->toArray(); //return an array with all data 
//...

The Versions

29/03 2016

dev-master

9999999-dev

A wrapper for ocrwebservice.com

  Sources   Download

The Requires

 

29/03 2016

v0.0.2

0.0.2.0

A wrapper for ocrwebservice.com

  Sources   Download

The Requires

 

29/03 2016

v0.0.1

0.0.1.0

A wrapper for ocrwebservice.com

  Sources   Download

The Requires