|
| 1 | +// |
| 2 | +// Dynamsoft JavaScript Library for Basic Initiation of Dynamic Web TWAIN |
| 3 | +// More info on Dynamic Web TWAIN: http://www.dynamsoft.com/Products/WebTWAIN_Overview.aspx |
| 4 | +// |
| 5 | +// Copyright 2025, Dynamsoft Corporation |
| 6 | +// Author: Dynamsoft Team |
| 7 | +// Version: 19.0 |
| 8 | +// |
| 9 | +/// <reference path="dynamsoft.webtwain.initiate.js" /> |
| 10 | +var Dynamsoft = Dynamsoft || { DWT: {} }; |
| 11 | + |
| 12 | +/// |
| 13 | +Dynamsoft.DWT.AutoLoad = true; |
| 14 | +/// |
| 15 | +Dynamsoft.DWT.Containers = [{ WebTwainId: '', ContainerId: 'dwtcontrolContainer', Width: 350, Height: 380 }]; |
| 16 | + |
| 17 | +///////////////////////////////////////////////////////////////////////////////////// |
| 18 | +// WARNING: The productKey in this file is protected by copyright law // |
| 19 | +// and international treaty provisions. Unauthorized reproduction or // |
| 20 | +// distribution of this productKey, or any portion of it, may result in severe // |
| 21 | +// criminal and civil penalties, and will be prosecuted to the maximum // |
| 22 | +// extent possible under the law. Further, you may not reverse engineer, // |
| 23 | +// decompile, disassemble, or modify the productKey . // |
| 24 | +///////////////////////////////////////////////////////////////////////////////////// |
| 25 | +/// If you need to use multiple keys on the same server, you can combine keys and write like this |
| 26 | +/// Dynamsoft.DWT.ProductKey = 'key1;key2;key3'; |
| 27 | +/// To get a free trial, please visit https://www.dynamsoft.com/customer/license/trialLicense?product=dwt&utm_source=installer. |
| 28 | +Dynamsoft.DWT.ProductKey = 't0114NwEAADXUFBxK4hY3NKFp4gOnxH3twvk6g+kyrTsASXPZy50VDZYZSUHapiiH+Gsmx3IHYbcziGR9GFQmWKSgKs7AUZvnggNbY+kLGFcRcH0BYQ4uUeeqAJZvZm0aPx9/PB7LYGzqDBkjnDhR1B1tYD2t'; |
| 29 | + |
| 30 | +/// |
| 31 | +//Dynamsoft.DWT.ResourcesPath = 'Resources'; |
| 32 | + |
| 33 | +/// |
| 34 | +Dynamsoft.DWT.IfAddMD5InUploadHeader = false; |
| 35 | + |
| 36 | +/// |
| 37 | +///true will make our processing icons align with the initiated div container, otherwise align with the whole page instead |
| 38 | +Dynamsoft.DWT.IfConfineMaskWithinTheViewer = true; |
| 39 | +/*Dynamsoft.DWT.CustomizableDisplayInfo = { |
| 40 | +
|
| 41 | + errorMessages: { |
| 42 | +
|
| 43 | + // launch |
| 44 | + ERR_MODULE_NOT_INSTALLED: 'Error: The Dynamic Web TWAIN module is not installed.', |
| 45 | + ERR_BROWSER_NOT_SUPPORT: 'Error: This browser is currently not supported.', |
| 46 | + ERR_CreateID_MustNotInContainers: 'Error: Duplicate ID detected for creating Dynamic Web TWAIN objects, please check and modify.', |
| 47 | + ERR_CreateID_NotContainer: 'Error: The ID of the DIV for creating the new DWT object is invalid.', |
| 48 | + ERR_DWT_NOT_DOWNLOADED: 'Error: Failed to download the Dynamic Web TWAIN module.', |
| 49 | +
|
| 50 | + // image view |
| 51 | + limitReachedForZoomIn: "Error: You have reached the limit for zooming in", |
| 52 | + limitReachedForZoomOut: "Error: You have reached the limit for zooming out", |
| 53 | +
|
| 54 | + // image editor |
| 55 | + insufficientParas: 'Error: Not enough parameters.', |
| 56 | + invalidAngle: 'Error: The angle you entered is invalid.', |
| 57 | + invalidHeightOrWidth: "Error: The height or width you entered is invalid.", |
| 58 | + imageNotChanged: "Error: You have not changed the current image." |
| 59 | +
|
| 60 | + }, |
| 61 | +
|
| 62 | + // launch |
| 63 | + generalMessages: { |
| 64 | + checkingDWTVersion: 'Checking WebTwain version ...', |
| 65 | + updatingDService: 'Dynamic Web TWAIN Service is updating ...', |
| 66 | + downloadingDWTModule: 'Downloading the Dynamic Web TWAIN module.', |
| 67 | + refreshNeeded: 'Please REFRESH your browser.', |
| 68 | + downloadNeeded: 'Please download and install the Dynamic Web TWAIN.', |
| 69 | + DWTmoduleLoaded: 'The Dynamic Web TWAIN module is loaded.' |
| 70 | + }, |
| 71 | +
|
| 72 | + customProgressText: { |
| 73 | +
|
| 74 | + // html5 event |
| 75 | + upload: 'Uploading...', |
| 76 | + download: 'Downloading...', |
| 77 | + load: 'Loading...', |
| 78 | + decode: 'Processing...', |
| 79 | + decodeTIFF: 'Processing tiff...', |
| 80 | + decodePDF: 'Processing pdf...', |
| 81 | + encode: 'Processing...', |
| 82 | + encodeTIFF: 'Processing tiff...', |
| 83 | + encodePDF: 'Processing pdf...', |
| 84 | +
|
| 85 | + transfer: 'Transferring...', |
| 86 | + // image control |
| 87 | + canvasLoading: 'Loading ...' |
| 88 | + }, |
| 89 | +
|
| 90 | + // image editor |
| 91 | + buttons: { |
| 92 | + titles: { |
| 93 | + 'previous': 'Previous Image', |
| 94 | + 'next': 'Next Image', |
| 95 | + 'print': 'Print Image', |
| 96 | + 'scan': 'Acquire new Image(s)', |
| 97 | + 'load': 'Load local Image(s)', |
| 98 | + 'rotateleft': 'Rotate Left', |
| 99 | + 'rotate': 'Rotate', |
| 100 | + 'rotateright': 'Rotate Right', |
| 101 | + 'deskew': 'Deskew', |
| 102 | + 'crop': 'Crop Selected Area', |
| 103 | + 'cut': 'Cut Selected Area', |
| 104 | + 'changeimagesize': 'Change Image Size', |
| 105 | + 'flip': 'Flip Image', |
| 106 | + 'mirror': 'Mirror Image', |
| 107 | + 'zoomin': 'Zoom In', |
| 108 | + 'originalsize': 'Show Original Size', |
| 109 | + 'zoomout': 'Zoom Out', |
| 110 | + 'stretch': 'Stretch Mode', |
| 111 | + 'fit': 'Fit Window', |
| 112 | + 'fitw': 'Fit Horizontally', |
| 113 | + 'fith': 'Fit Vertically', |
| 114 | + 'hand': 'Hand Mode', |
| 115 | + 'rectselect': 'Select Mode', |
| 116 | + 'zoom': 'Click to Zoom In', |
| 117 | + 'restore': 'Restore Orginal Image', |
| 118 | + 'save': 'Save Changes', |
| 119 | + 'close': 'Close the Editor', |
| 120 | + 'removeall': 'Remove All Images', |
| 121 | + 'removeselected': 'Remove All Selected Images' |
| 122 | + } |
| 123 | + }, |
| 124 | +
|
| 125 | + dialogText: { |
| 126 | + dlgRotateAnyAngle: ['Angle :', 'Interpolation:', 'Keep size', ' OK ', 'Cancel'], |
| 127 | + dlgChangeImageSize: ['New Height :', 'New Width :', 'Interpolation:', ' OK ', 'Cancel'], |
| 128 | + saveChangedImage: ['You have changed the image, do you want to keep the change(s)?', ' Yes ', ' No '], |
| 129 | + selectSource: ['Select Source:', 'Select', 'Cancel', 'There is no source available!'] |
| 130 | + } |
| 131 | +};*/ |
| 132 | + |
| 133 | + |
| 134 | +/// All callbacks are defined in the dynamsoft.webtwain.install.js file, you can customize them. |
| 135 | +// Dynamsoft.DWT.RegisterEvent('OnWebTwainReady', function(){ |
| 136 | +// // webtwain has been inited |
| 137 | +// }); |
| 138 | + |
0 commit comments