Skip to main content

Scanning a document from an image | Cordova Document Scanner

Detect Document on the Image

ScanbotSdk.detectDocumentOnPage(successCallback, errorCallback, options)

Runs document detection on the original image of the given page. The detection status, polygon and cropped document image are returned as a new page object in the success callback.

Callbacks:

successCallback : function(result)
  • result.page is the page object with the detection result.
errorCallback : function(error)
  • error.status - 'ERROR' in all error cases.
  • error.message - Contains the error message as a string.

Options:

var options = {
page: ...
};
  • options.page - the page to crop.

Want to scan longer than one minute?

Generate a free trial license to test the Scanbot SDK thoroughly.

Get your free Trial License

What do you think of this documentation?