diff --git a/info/api/Dynamsoft_Enum.md b/info/api/Dynamsoft_Enum.md index ce7f3a79..67b6ce91 100644 --- a/info/api/Dynamsoft_Enum.md +++ b/info/api/Dynamsoft_Enum.md @@ -897,5 +897,5 @@ Note: IT_MULTIPAGE_PDF & IT_MULTIPAGE_TIF are only applicable to the ImageType o | Label | Value | Description | |:-|:-|:-| -| Normal | 0 | The data is processed on the server side first, and then displayed in the viewer | -| Balanced | 1 | The data is processed in the canvas and then updated to the server side | \ No newline at end of file +| Normal | 0 | Original mode, the image data is processed in the buffer | +| Balance | 1 | The image data is processed in the browser canvas | \ No newline at end of file diff --git a/info/api/Dynamsoft_WebTwainEnv.md b/info/api/Dynamsoft_WebTwainEnv.md index 3e8ec631..d48fb165 100644 --- a/info/api/Dynamsoft_WebTwainEnv.md +++ b/info/api/Dynamsoft_WebTwainEnv.md @@ -231,7 +231,7 @@ interface DWTInitialConfig { ### `UseDefaultViewer` -Whether to use the built-in viewer. If it is set to `false` , the file `dynamsoft.viewer.js` is not loaded at all and there is no way to add it back later. Therefore, only set it to `false` when you absolutely won't need the viewer or will be building your own viewer. +Whether to use the built-in viewer. If it is set to `false` , the file `dynamsoft.webtwain.viewer.js` is not loaded at all and there is no way to add it back later. Therefore, only set it to `false` when you absolutely won't need the viewer or will be building your own viewer. ### `CustomizableDisplayInfo` @@ -287,7 +287,8 @@ Dynamsoft.DWT.RegisterEvent('OnWebTwainError', ); -Dynamsoft_OnError: function(Dynamsoft.DWT.Exception){ - // error handling +function Dynamsoft_OnError(error){ + // error handling + console.error(error.message); } ``` diff --git a/info/api/WebTwain_Acquire.md b/info/api/WebTwain_Acquire.md index 54345e9c..ff392db3 100644 --- a/info/api/WebTwain_Acquire.md +++ b/info/api/WebTwain_Acquire.md @@ -4502,7 +4502,7 @@ interface CapabilitySetup { **Parameters** -`capabilities`: A object that describes how to set capabilities. +`capabilities`: An object that describes how to set capabilities. `successCallback`: A callback function that is executed if the request succeeds. @@ -4528,6 +4528,7 @@ interface CapabilitySetup { v16.0+ v16.0+ v16.0+ +v16.0+ v18.2+ diff --git a/info/api/WebTwain_Edit.md b/info/api/WebTwain_Edit.md index f9deac17..0fbd29e1 100644 --- a/info/api/WebTwain_Edit.md +++ b/info/api/WebTwain_Edit.md @@ -214,7 +214,7 @@ SetDPI( `resample`: Whether to resample the image. When it is true, the image size will change. -`method`: Specify the algorithm for the change. Please refer to [EnumDWT_InterpolationMethod]({{{site.info}}api/Dynamsoft_Enum.html#dynamsoftdwtenumdwt_interpolationmethod). +`method`: Specify the algorithm for the change. Please refer to [EnumDWT_InterpolationMethod]({{site.info}}api/Dynamsoft_Enum.html#dynamsoftdwtenumdwt_interpolationmethod). `successCallback`: A callback function that is executed if the request succeeds. @@ -1269,6 +1269,7 @@ BackgroundFillColor: number; H5(macOS/TWAIN) H5(macOS/ICA) H5(Linux) +Android Service @@ -1277,6 +1278,7 @@ BackgroundFillColor: number; v11.0+ v11.0+ v12.1+ +v18.2+ diff --git a/info/api/WebTwain_IO.md b/info/api/WebTwain_IO.md index 71368232..e4f712ae 100644 --- a/info/api/WebTwain_IO.md +++ b/info/api/WebTwain_IO.md @@ -1265,8 +1265,8 @@ HTTPDownload( v4.0+ v4.0+ v4.0+ -v4.0+Z -v18.2+Z +v4.0+ +v18.2+ @@ -1337,6 +1337,7 @@ HTTPDownloadEx( H5(macOS/TWAIN) H5(macOS/ICA) H5(Linux) +Android Service @@ -1345,6 +1346,7 @@ HTTPDownloadEx( v5.0+ v5.0+ v5.0+ +v18.2+ @@ -1424,6 +1426,7 @@ HTTPDownloadThroughPost( H5(macOS/TWAIN) H5(macOS/ICA) H5(Linux) +Android Service @@ -1432,6 +1435,7 @@ HTTPDownloadThroughPost( v5.0+ v5.0+ v5.0+ +v18.2+ @@ -1480,6 +1484,7 @@ HTTPDownloadDirectly( H5(macOS/TWAIN) H5(macOS/ICA) H5(Linux) +Android Service @@ -1488,6 +1493,7 @@ HTTPDownloadDirectly( v7.0+ v7.0+ v7.0+ +v18.2+ @@ -1671,6 +1677,7 @@ HTTPUploadThroughPutEx( H5(macOS/TWAIN) H5(macOS/ICA) H5(Linux) +Android Service @@ -1679,6 +1686,7 @@ HTTPUploadThroughPutEx( v5.0+ v5.0+ v5.0+ +v18.2+ @@ -1731,6 +1739,7 @@ HTTPUploadThroughPost( H5(macOS/TWAIN) H5(macOS/ICA) H5(Linux) +Android Service @@ -1739,6 +1748,7 @@ HTTPUploadThroughPost( v4.0+ v4.0+ v4.0+ +v18.2+ @@ -1829,6 +1839,7 @@ HTTPUploadThroughPostEx( H5(macOS/TWAIN) H5(macOS/ICA) H5(Linux) +Android Service @@ -1837,6 +1848,7 @@ HTTPUploadThroughPostEx( v5.0+ v5.0+ v5.0+ +v18.2+ @@ -1893,6 +1905,7 @@ HTTPUploadAllThroughPostAsMultiPageTIFF( H5(macOS/TWAIN) H5(macOS/ICA) H5(Linux) +Android Service @@ -1901,6 +1914,7 @@ HTTPUploadAllThroughPostAsMultiPageTIFF( v4.0+ v4.0+ v4.0+ +v18.2+ @@ -1957,6 +1971,7 @@ HTTPUploadAllThroughPostAsPDF( H5(macOS/TWAIN) H5(macOS/ICA) H5(Linux) +Android Service @@ -1965,6 +1980,7 @@ HTTPUploadAllThroughPostAsPDF( v5.0+ v5.0+ v5.0+ +v18.2+ @@ -2021,6 +2037,7 @@ HTTPUploadThroughPostAsMultiPagePDF( H5(macOS/TWAIN) H5(macOS/ICA) H5(Linux) +Android Service @@ -2029,6 +2046,7 @@ HTTPUploadThroughPostAsMultiPagePDF( v6.0+ v6.0+ v6.0+ +v18.2+ @@ -2085,6 +2103,7 @@ HTTPUploadThroughPostAsMultiPageTIFF( H5(macOS/TWAIN) H5(macOS/ICA) H5(Linux) +Android Service @@ -2093,6 +2112,7 @@ HTTPUploadThroughPostAsMultiPageTIFF( v6.0+ v6.0+ v6.0+ +v18.2+ @@ -2150,6 +2170,7 @@ HTTPUploadThroughPostDirectly( H5(macOS/TWAIN) H5(macOS/ICA) H5(Linux) +Android Service @@ -2158,6 +2179,7 @@ HTTPUploadThroughPostDirectly( v7.0+ v7.0+ v7.0+ +v18.2+ @@ -3001,9 +3023,38 @@ ShareImages( type: Dynamsoft.DWT.EnumDWT_ImageType ): Promise< void>; ``` -If ```indicies``` is an array, the behavour is dependant on ```type```: +If `indicies` is an array, the behavour is dependant on `type`: + - If type is set to PDF or TIFF, a single multi-page file is shared + - If any other type is set, mutiple single page files will be shared in the format of filename1.filetype, filename2.filetype, etc. + +**Availability** + +
+ + + + + + + + + + + + + + + + + + + + +
ActiveXH5(Windows)H5(macOS/TWAIN)H5(macOS/ICA)H5(Linux)Android Service
not supportednot supportednot supportednot supportednot supportedv18.2+
+
+ --- ## SaveSelectedImagesAsMultiPagePDF @@ -3467,6 +3518,7 @@ IfShowCancelDialogWhenImageTransfer: boolean; H5(macOS/TWAIN) H5(macOS/ICA) H5(Linux) +Android Service @@ -3475,6 +3527,7 @@ IfShowCancelDialogWhenImageTransfer: boolean; v5.2+ v5.2+ v5.2+ +v18.2+ @@ -3506,6 +3559,7 @@ IfShowProgressBar: boolean; H5(macOS/TWAIN) H5(macOS/ICA) H5(Linux) +Android Service @@ -3514,6 +3568,7 @@ IfShowProgressBar: boolean; v10.0+ v11.0+ v12.1+ +v18.2+ diff --git a/info/api/WebTwain_Viewer.md b/info/api/WebTwain_Viewer.md index 071681a4..6dc700c0 100644 --- a/info/api/WebTwain_Viewer.md +++ b/info/api/WebTwain_Viewer.md @@ -251,6 +251,10 @@ interface ImageEditor { * Show the ImageEditor object. */ show(): boolean; + /** + * + **/ + save(): boolean; /** * Hide the ImageEditor object. */ @@ -260,6 +264,62 @@ interface ImageEditor { */ dispose(): boolean; }; + +interface EditorSettings { +    /** +     * Specify an HTML Element. +     */ +    element?: HTMLDivElement | HTMLElement; +    /** +     * The width of the image editor viewer. The default value is "100%". +     * 'Invalid property value' will be reported when the set value is not string or number. +     */ +    width?: number | string; +    /** +     * The height of the image editor viewer. The default value is "100%". +     * 'Invalid property value' will be reported when the set value is not string or number. +     */ +    height?: number | string; +    /** + * The border of the ImageEditor viewer. +     * 'Invalid property value' is reported when the set value does not meet the CSS standard. +     */ +    border?: string; +    /** +     * Set the border of the top toolbar. +     * 'Invalid property value' is reported when the set value does not meet the CSS standard. +     */ +    topMenuBorder?: string; +    /** +     * The inner border of the image area. +     */ +    innerBorder?: string; +    /** +     * The background color/image of the ImageEditor viewer. +     * 'Invalid property value' is reported when the set value does not meet the CSS standard. +     */ +    background?: string; +    /** +     * Whether to pop up a window prompting to save the changes. The default value is true. + +     * 'Invalid property value' will be reported when the specified value type is wrong or the parameter name is spelled incorrectly. +     */ +    promptToSaveChange?: boolean; +    /** +     * Modify button titles and whether to hide specific buttons in the image editor viewer. +     * 'Invalid property value' will be reported when the specified value type is wrong or the parameter name is spelled incorrectly. +     */ +    buttons?: any; +    /** +     * Define the dialog text +     * 'Invalid property value' will be reported when the specified value type is wrong or the parameter name is spelled incorrectly. +     */ +    dialogText?: any; +    /** +     * Default is normal, value: normal=0, balance=1. +     */ +    workMode?: number | DynamsoftEnumsDWT.EnumDWT_WorkMode; +} ``` **Parameters** @@ -304,97 +364,97 @@ imageEditor.show(); // Customize the editor var editorSettings = { /* Show the editor within the DIV 'imageEditor'*/ - element?: document.getElementById("imageEditor"), - width?: 600, - height?: 400, - border?: "1px solid rgb(204, 204, 204)", - topMenuBorder?: "", - innerBorder?: "", - background?: "rgb(255, 255, 255)", - promptToSaveChange?: true, - buttons?: { - titles?: { - previous?: "Previous Image", - next?: "Next Image", - print?: "Print Image", - scan?: "Scan Documents", - load?: "Load Local Images", - rotateleft?: "Rotate Left", - rotate?: "Rotate", - rotateright?: "Rotate Right", - deskew?: "Deskew", - crop?: "Crop Selected Area", - cut?: "Cut Selected Area", - changeimagesize?: "Change Image Size", - flip?: "Flip Image", - mirror?: "Mirror Image", - zoomin?: "Zoom In", - originalsize?: "Show Original Size", - zoomout?: "Zoom Out", - stretch?: "Stretch Mode", - fit?: "Fit Window", - fitw?: "Fit Horizontally", - fith?: "Fit Vertically", - hand?: "Hand Mode", - rectselect?: "Select Mode", - zoom?: "Click to Zoom In", - restore?: "Restore Original Image", - save?: "Save Changes", - close?: "Close the Editor", - removeall?: "Remove All Images", - removeselected?: "Remove All Selected Images", + element: document.getElementById("imageEditor"), + width: 600, + height: 400, + border: "1px solid rgb(204, 204, 204)", + topMenuBorder: "", + innerBorder: "", + background: "rgb(255, 255, 255)", + promptToSaveChange: true, + buttons: { + titles: { + previous: "Previous Image", + next: "Next Image", + print: "Print Image", + scan: "Scan Documents", + load: "Load Local Images", + rotateleft: "Rotate Left", + rotate: "Rotate", + rotateright: "Rotate Right", + deskew: "Deskew", + crop: "Crop Selected Area", + cut: "Cut Selected Area", + changeimagesize: "Change Image Size", + flip: "Flip Image", + mirror: "Mirror Image", + zoomin: "Zoom In", + originalsize: "Show Original Size", + zoomout: "Zoom Out", + stretch: "Stretch Mode", + fit: "Fit Window", + fitw: "Fit Horizontally", + fith: "Fit Vertically", + hand: "Hand Mode", + rectselect: "Select Mode", + zoom: "Click to Zoom In", + restore: "Restore Original Image", + save: "Save Changes", + close: "Close the Editor", + removeall: "Remove All Images", + removeselected: "Remove All Selected Images", }, - visibility?: { - scan?: true, - load?: true, - print?: true, - removeall?: true, - removeselected?: true, - rotateleft?: true, - rotate?: true, - rotateright?: true, - deskew?: true, - crop?: true, - cut?: true, - changeimagesize?: true, - flip?: true, - mirror?: true, - zoomin?: true, - originalsize?: true, - zoomout?: true, - stretch?: true, - fit?: true, - fitw?: true, - fith?: true, - hand?: true, - rectselect?: true, - zoom?: true, - restore?: true, - save?: true, - close?: true, + visibility: { + scan: true, + load: true, + print: true, + removeall: true, + removeselected: true, + rotateleft: true, + rotate: true, + rotateright: true, + deskew: true, + crop: true, + cut: true, + changeimagesize: true, + flip: true, + mirror: true, + zoomin: true, + originalsize: true, + zoomout: true, + stretch: true, + fit: true, + fitw: true, + fith: true, + hand: true, + rectselect: true, + zoom: true, + restore: true, + save: true, + close: true, }, }, - dialogText?: { - dlgRotateAnyAngle?: [ + dialogText: { + dlgRotateAnyAngle: [ "Angle :", "Interpolation:", "Keep size", " OK ", "Cancel", ], - dlgChangeImageSize?: [ + dlgChangeImageSize: [ "New Height :", "New Width :", "Interpolation method:", " OK ", "Cancel", ], - saveChangedImage?: [ + saveChangedImage: [ "You have changed the image, do you want to keep the change(s)?", " Yes ", " No ", ], - selectSource?: [ + selectSource: [ "Select Source:", "Select", "Cancel", @@ -2454,7 +2514,7 @@ interface pageNumberSettings { ## save -Save the update image from the ImageEditor +Keeps the image data in the browser canvas in sync with the buffer. **Syntax** ```typescript @@ -2488,8 +2548,8 @@ save():Promise; **Example** ```javascript -var objImageEditor = DWObject.Viewer.createImageEditor(editorSettings?:EditorSettings); -objImageEditor.save():Promise; +var ImageEditor = DWObject.Viewer.createImageEditor(editorSettings); +ImageEditor.save(); ``` diff --git a/info/api/index.md b/info/api/index.md index 99fd29ce..d1696a97 100644 --- a/info/api/index.md +++ b/info/api/index.md @@ -18,9 +18,10 @@ permalink: /info/api/ |[`Dynamsoft.DWT`]({{site.info}}api/Dynamsoft_WebTwainEnv.html) | [`Dynamsoft.DWT.Enum`]({{site.info}}api/Dynamsoft_Enum.html) | ### Events + | | |:-|:-| -|[`OnWebTwainReady`]({{site.info}}api/Dynamsoft_WebTwainEnv.html#OnWebTwainReady)|[`OnWebTwainReady`]({{site.info}}api/Dynamsoft_WebTwainEnv.html#OnWebTwainError)| +|[`OnWebTwainReady`]({{site.info}}api/Dynamsoft_WebTwainEnv.html#OnWebTwainReady)|[`OnWebTwainError`]({{site.info}}api/Dynamsoft_WebTwainEnv.html#OnWebTwainError)| ## WebTwain @@ -343,7 +344,7 @@ permalink: /info/api/ |[`HTTPUploadThroughPostAsMultiPageTIFF()`]({{site.info}}api/WebTwain_IO.html#httpuploadthroughpostasmultipagetiff)|[`HTTPUploadThroughPostDirectly()`]({{site.info}}api/WebTwain_IO.html#httpuploadthroughpostdirectly)|[`SaveAsBMP()`]({{site.info}}api/WebTwain_IO.html#saveasbmp)| |[`SaveAsJPEG()`]({{site.info}}api/WebTwain_IO.html#saveasjpeg)| [`SaveAsPDF()`]({{site.info}}api/WebTwain_IO.html#saveaspdf)|[`SaveAsPNG()`]({{site.info}}api/WebTwain_IO.html#saveaspng)| |[`SaveAsTIFF()`]({{site.info}}api/WebTwain_IO.html#saveastiff)| [`SaveSelectedImagesAsMultiPagePDF()`]({{site.info}}api/WebTwain_IO.html#saveselectedimagesasmultipagepdf)|[`SaveSelectedImagesAsMultiPageTIFF()`]({{site.info}}api/WebTwain_IO.html#saveselectedimagesasmultipagetiff)| -| [`SaveAllAsMultiPageTIFF()`]({{site.info}}api/WebTwain_IO.html#saveallasmultipagetiff)|[`SaveAllAsPDF()`]({{site.info}}api/WebTwain_IO.html#saveallaspdf)||[`ShareImages()`]({{site.info}}api/WebTwain_IO.html#shareimages)| +| [`SaveAllAsMultiPageTIFF()`]({{site.info}}api/WebTwain_IO.html#saveallasmultipagetiff)|[`SaveAllAsPDF()`]({{site.info}}api/WebTwain_IO.html#saveallaspdf)|[`ShareImages()`]({{site.info}}api/WebTwain_IO.html#shareimages)|