Web Demos

BARCODE READER SDK DEMO

Explore the flexibe barcode reading settings to optimize for your specific usage scenario.

WEB TWAIN SDK DEMO

Try the most popular web scanner features: scan images, import local images and PDF files, edit, save to local, upload to database, and etc.

BARCODE READER JAVASCRIPT DEMO

Transform any camera-equipped devices into real-time, browser-based barcode and QR code scanners.

MRZ SCANNER WEB DEMO

Detects the machine-readable zone of a passport, scans the text, and parses into human-readable data.

APP STORE DEMOS

BARCODE READER SDK FOR IOS

BARCODE READER SDK FOR ANDROID

VIEW MORE DEMOS >
Dev Center
Table of contents

API Appendix

Error List

Code String
0 Successful
-1001 General failure
-1002 Not enough memory to perform operation
-1003 Source Manager unable to find the specified Source
-1004 Source is connected to maximum supported number of applications
-1005 Source or Source Manager reported an error to the user and handled the error
-1006 Capability not supported by Source or operation is not supported on capability, or capability had dependencies on other capabilities and cannot be operated upon at this time
-1009 Unrecognized operation triplet
-1010 Data parameter out of supported range
-1011 Operation out of expected sequence
-1012 Unknown destination in DSM_Entry
-1013 Capability not supported by source
-1014 Operation not supported by capability
-1015 Capability has dependency on other capability and cannot be operated upon at this time
-1016 File System operation is denied (file is protected)
-1017 Operation failed because file already exists
-1018 File not found
-1019 Operation failed because directory is not empty
-1020 The feeder is jammed
-1021 The feeder detected multiple pages
-1022 Error writing file
-1023 The device went offline prior to or during this operation
-1030 Can not open Source Manager “TWain_32.dll” is missing or is in use by another application
-1031 Sequence error. The operation can not be performed upon the current Source Manager or Source state
-1032 User cancelled the operation
-1033 Invalid Enumerations
-1034 Invalid value
-1035 There is no image
-1036 Error reading file
-1070 BMP file or format error
-1071 JPEG file or format error
-1073 Only 24-bit true color and 8-bit gray-scaled images are supported for JPEG compression
-1080 General TIFF error
-1081 TIFF format error or not supported
-1090 BMP format error or not supported
-1100 PNG format error or not supported
-1110 Unrecognized file extension
-1200 PDF format error or not supported
-2000 Can not initiate the internet session
-2001 HTTP request error
-2002 HTTP server error
-2003 HTTP process error
-2004 FTP download file is too large
-2007 The system is busy, some operations are not completed. Please try later
-2207 The dynamsoft service installed on your computer is outdated and no longer works with the JavaScript code on the website
-2208 The connection with the local dynamsoft service encountered a problem and has been reset
-2209 The HTML5 (Chrome&Firefox) edition does not support this method or property
-2300 Http upload error: the HTTP Server cannot empty
-2301 Network error
-2302 The result format is invalid
-2303 Upload cancelled
-2304 Http download error: the url is invalid
-2305 User cancelled the operation
-2306 Upload Error: the upload file cannot be empty
-2307 The width or height you entered is invalid
-2308 The local dynamsoft service has been stopped
-2309 The LocalFile is emtpy in the Function
-2310 The Enumerations is out of range
-2311 The RemoteFile is emtpy in Barcode Download Function
-2312 The file length is emtpy
-2313 The size of the images you are about to upload has exceeded the allowed size
-2314 The parameter cannot be empty
-2315 The Enumerations is out of range
-2316 The RemoteFile is emtpy in Webcam Download Function
-2317 The RemoteFile is emtpy in Pdf Download Function
-2318 Invalid destination file
-2319 Invalid source file
-2320 Invalid file
-2321 The Enumerations is out of range
-2322 The left or top or right or bottom you entered is invalid
-2323 The OCR output format is not supported
-2324 The OCR page set mode is not supported
-2325 The current product key is empty or invalid, please contact the site administrator
-2326 The current product key has expired, please contact the site administrator
-2327 The current product key does not support Chrome, please contact the site administrator
-2328 The current product key does not support Firefox, please contact the site administrator
-2329 The current product key does not support IE, please contact the site administrator
-2330 The current product key does not support Edge, please contact the site administrator
-2331 The current product key is a trial version key but your local dynamsoft service is in full version, please uninstall your local version first and access this page again to install the correct version. If the issue persists, please contact the site administrator
-2332 The current product key is a full version key but your local dynamsoft service is in trial version, please uninstall your local version first and access this page again to install the correct version. If the issue persists, please contact the site administrator
-2333 The current product key is missing the core license, please contact the site administrator
-2334 The current product key does not include a license for reading 1D barcode, please contact the site administrator
-2335 The current product key does not include a license for reading QRcode barcode, please contact the site administrator
-2336 The current product key does not include a license for reading PDF417 barcode, please contact the site administrator
-2337 The current product key does not include a license for reading DataMatrix barcode, please contact the site administrator
-2338 The current product key does not support Webcam, please contact the site administrator
-2339 The current product key does not support pdf rasterizer, please contact the site administrator
-2340 The current product key does not support OCR, please contact the site administrator
-2341 The current product key does not support OCR pro, please contact the site administrator
-2342 The domain of your current site does not match the domain bound in the current product key, please contact the site administrator
-2343 The current product key does not support your browser, please contact the site administrator
-2344 The current product key does not support Windows OS, please contact the site administrator
-2345 The current product key does not support MAC OS, please contact the site administrator
-2346 The current product key does not support Linux OS, please contact the site administrator
-2347 The current product key does not support your OS, please contact the site administrator
-2348 The current product key is invalid because it’s generated with the licenses of a different major version
-2349 The current product key does not include a license for reading barcode, please contact the site administrator
-2350 The indices cannot be empty
-2351 You cannot upload more than one image when the format is BMP, JPG or PNG
-2352 The indices are out of range
-2353 The header name being used is a protected keyword and is not allowed
-2354 The header name cannot be empty
-2355 The header name cannot be null
-2356 The header name cannot be undefined
-2357 The header name you entered is invalid
-2358 The type of the parameter indices must be an Array
-2359 The Enumerations is out of range
-2360 The Enumerations is null or undefined
-2361 You cannot convert more than one image to base64 string when the format is BMP, JPG or PNG
-2362 Convert to base64 failed
-2367 Invalid value for the parameter segmentUploadThreshold
-2368 Invalid value for the parameter moduleSize
-2369 The module for Dynamic Web TWAIN has failed to download
-2370 The current product key is invalid, please contact the site administrator
-2372 You cannot convert to binary more than one image when the format is BMP, JPG or PNG
<= -3000 See ErrorString property for details
  • New APIs in v17.0 replace old APIs in v16.2-, all old APIs are deprecated.
v17.0 v16.2-
Viewer.autoChangeIndex Viewer.topPageChanged()

For the Camera add-on

  • New APIs in v16.2 replace old APIs in v16.1-, all old APIs are deleted.
v16.2 v16.1-
Addon.Camera.showVideo() Viewer.showVideo()
Addon.Camera.closeVideo() Viewer.closeVideo()
Addon.Camera.off() Viewer.off()
Addon.Camera.on("video-closed") Viewer.on("video-closed")
Addon.Camera.on("video-error") Viewer.on("video-error")

For the Viewer

  • New APIs in v16.2 replace old APIs in v16.1-, all old APIs are deprecated.
v16.2 v16.1-
Viewer.background BackgroundColor
Viewer.bind() , Viewer.show() , Viewer.hide() BindViewer()
Viewer.cursor MouseShape
Viewer.fitWindow() FitWindowType , IfFitWindow
Viewer.height Height
Viewer.ifAutoScroll IfAutoScroll
Viewer.on("click", callback) RegisterEvent("OnMouseClick", callback)
Viewer.on("contextmenu", callback) RegisterEvent("OnMouseRightClick", callback)
Viewer.on("dblclick", callback) RegisterEvent("OnMouseDoubleClick", callback)
Viewer.on("mousemove", callback) RegisterEvent("OnMouseMove", callback)
Viewer.on("pageAreaSelected", callback) RegisterEvent("OnImageAreaSelected", callback)
Viewer.on("pageAreaUnselected", callback) RegisterEvent("OnImageAreaDeSelected", callback)
Viewer.on("topPageChanged", callback) RegisterEvent("OnTopImageInTheViewChanged", callback)
Viewer.pageMargin ImageMargin
Viewer.selectedPageBorder SelectionImageBorderColor
Viewer.selectionRectAspectRatio SelectionRectAspectRatio
Viewer.setSelectedAreas() SetSelectedImageArea()
Viewer.showPageNumber ShowPageNumber
Viewer.unbind() UnbindView()
Viewer.width Width
Viewer.zoom Zoom
ViewerEvent.imageX MouseX
ViewerEvent.imageY MouseY

NOTE

ViewerEvent.imageX and ViewerEvent.imageY are only available as the first argument in callback functions for the mouse events “click”, “dblclick”, “contextMenu” and “mousemove”.

  /* Set the size of the viewer */
  DWObject.Viewer.height = 800;
  DWObject.Viewer.width = 600;
  /* Create a thumbnail viewer, note that this viewer can be hidden or disposed */
  var objThumbnailViewer = DWObject.Viewer.createThumbnailViewer(thumbnailViewerSettings);
  objThumbnailViewer.show();
  //objThumbnailViewer.hide();
  //objThumbnailViewer.dispose();
  /* updateViewMode() is used to change only the view mode of the thumbnail viewer */
  objThumbnailViewer.updateViewMode(viewMode: ViewMode);
  /* The following two are used to hook or unhook events to the thumbnail viewer */
  objThumbnailViewer.on()
  objThumbnailViewer.off()
  • ShowImageEditor()

While this method still works, it’s deprecated and the alternative is shown in the code below

  /* The image editor is now created on the fly and can be hidden or disposed */
  var objImageEditor = DWObject.Viewer.createImageEditor(editorSettings);
  objImageEditor.show();
  objImageEditor.hide();
  objImageEditor.dispose();
  • Viewer.bindCustomElement()
  • Viewer.showCustomElement()
  • Viewer.hideCustomElement()
  • Viewer.toggleCustomElement()

As already mentioned, these four methods are removed and the alternative implementation is shown in the code below

  var objCustomElement = DWObject.Viewer.createCustomElement(document.getElementById("divCustomElement"));
  objCustomElement.show();
  objCustomElement.hide();
  objCustomElement.dispose();

Is this page helpful?

YesYes NoNo

In this article:

version 16.2

  • Latest Version
  • Version 17.2.1
  • Version 17.1.1
  • Version 17.0
  • Version 16.2
  • Version 16.1.1
Change +
© 2003–2022 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support