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.


successCallback : function(result)
  • 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.


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

Want to scan longer than one minute?

Generate your free "no-strings-attached" Trial License and properly test the Scanbot SDK.

Get your free Trial License

What do you think of this documentation?