Accusoft.OCRXpress.nodejs
recognize

Performs character recognition on an image and optionally outputs the results to a file.

Syntax:

Copy Code
var ocrx = require('ocr');  
ocrx.recognize(recognizeParams, function(err, document) {
  //...
});

Values:

recognizeParams  A set of options that are used to tune the OCR analysis process.
err  Either undefined or an error describing an error that occurred with the OCR analysis.
document  A memory structure representing the analyzed document structure of the image. See Document for more information.

Example Code:

Copy Code
var ocrx = require('ocr');  
var params = {
  input: 'image.bmp',
  output: 'output.pdf'
};
 
ocrx.recognize(params, function(err, doc) {
  if(err) {
    console.error(err);
    return;
  }
  console.log('OCR of input.bmp -> output.pdf has finished.');
  console.log('Recognized text is as follows:);
  console.log(doc.text);
});

 

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback