From 0335c28958d49da66b235715b0cbaa1b8e4828d7 Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Thu, 2 Jul 2026 13:25:23 +0800 Subject: [PATCH 01/51] Update sys_requirements.md --- gettingstarted/sys_requirements.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gettingstarted/sys_requirements.md b/gettingstarted/sys_requirements.md index e762801..205f84b 100644 --- a/gettingstarted/sys_requirements.md +++ b/gettingstarted/sys_requirements.md @@ -23,11 +23,11 @@ The SDK requires the following features to work: The following table is a list of supported browsers based on the above requirements: - | Browser Name | PC | Mobile | - | :----------: | :------------------------------: | :---------: | - | Chrome | v75+ | v75+ | - | Firefox | v69+ | v79+ | - | Safari | v14+ | v15+ | - | Edge | v79+ | v92+ | + | Browser Name | Version | + | :----------: | :------------------------------: | + | Chrome | v92+ | + | Firefox | v90+ | + | Safari | v14+ | + | Edge | v92+ | Apart from the browsers, the operating systems may impose some limitations of their own that could restrict the use of the SDKs. \ No newline at end of file From 937e37f7478a7f8017459ed75e322e35770ab4e5 Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Thu, 23 Jul 2026 16:10:55 +0800 Subject: [PATCH 02/51] Update sys_requirements.md --- gettingstarted/sys_requirements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gettingstarted/sys_requirements.md b/gettingstarted/sys_requirements.md index 205f84b..5e50eee 100644 --- a/gettingstarted/sys_requirements.md +++ b/gettingstarted/sys_requirements.md @@ -27,7 +27,7 @@ The following table is a list of supported browsers based on the above requireme | :----------: | :------------------------------: | | Chrome | v92+ | | Firefox | v90+ | - | Safari | v14+ | + | Safari | v15+ | | Edge | v92+ | Apart from the browsers, the operating systems may impose some limitations of their own that could restrict the use of the SDKs. \ No newline at end of file From a92a58289ad5340691fe33db840c401c5191a1c2 Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Thu, 23 Jul 2026 16:43:40 +0800 Subject: [PATCH 03/51] 5.0 release note --- releasenotes/index.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/releasenotes/index.md b/releasenotes/index.md index 72a623b..dc4756d 100644 --- a/releasenotes/index.md +++ b/releasenotes/index.md @@ -12,6 +12,30 @@ permalink: /releasenotes/index.html # Release Notes +## 5.0 (08/14/2026) + +### Highlights + +Dynamsoft Document Viewer 5.0 introduces a **pluggable architecture**, allowing you to load only the features you need — reducing bundle size and improving performance for your specific use cases. + +### Modular Feature Packages + +The following features are now packaged as standalone plugins that can be loaded on demand: + +* **Camera plugin** (`camera.js`): The Capture Viewer's camera-related JavaScript is now packaged independently. Only applications that need camera capture functionality need to load this module. +* **Annotation plugin** (`annotation.js`): All annotation-related functionality is now packaged independently. If your application doesn't require annotation editing, you can omit this module to reduce the overall bundle size. +* **Image PDF parser plugin** (`image-pdf.js`): A new lightweight PDF parsing plugin for loading pure image-based PDFs without the overhead of the full PDF rendering engine. Saving image-based PDFs is supported by the default JavaScript, so combined with this plugin, you can handle image PDF workflows end-to-end without the PDF WASM module. Note that if you need to process PDFs containing vector graphics or require annotation features, the full PDF WASM module will be automatically loaded when needed. + +### WASM Splitting & On-Demand Loading + +The default image processing WASM module has been split to improve load times and reduce memory usage: + +* **PDF** and **TIFF** modules are now separated from the core image processing WASM module. +* These format-specific WASM modules are loaded **on demand** — only when your application actually needs to process TIFF files or vector-based PDFs. +* For pure image-based PDFs, you can use the lightweight [Image PDF parser plugin](#modular-feature-packages) instead, eliminating the need to load the full PDF WASM module. +* This significantly reduces the initial download size, especially for camera-based document scanning scenarios where TIFF/vector PDF processing may not be needed. + + ## 4.0 (04/21/2026) ### New Features From 922a3578b66da67dff5ea7c06d1d25adf032f1bb Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Fri, 24 Jul 2026 10:50:00 +0800 Subject: [PATCH 04/51] details about pdf saving and default elements --- releasenotes/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/releasenotes/index.md b/releasenotes/index.md index dc4756d..0780418 100644 --- a/releasenotes/index.md +++ b/releasenotes/index.md @@ -23,8 +23,8 @@ Dynamsoft Document Viewer 5.0 introduces a **pluggable architecture**, allowing The following features are now packaged as standalone plugins that can be loaded on demand: * **Camera plugin** (`camera.js`): The Capture Viewer's camera-related JavaScript is now packaged independently. Only applications that need camera capture functionality need to load this module. -* **Annotation plugin** (`annotation.js`): All annotation-related functionality is now packaged independently. If your application doesn't require annotation editing, you can omit this module to reduce the overall bundle size. -* **Image PDF parser plugin** (`image-pdf.js`): A new lightweight PDF parsing plugin for loading pure image-based PDFs without the overhead of the full PDF rendering engine. Saving image-based PDFs is supported by the default JavaScript, so combined with this plugin, you can handle image PDF workflows end-to-end without the PDF WASM module. Note that if you need to process PDFs containing vector graphics or require annotation features, the full PDF WASM module will be automatically loaded when needed. +* **Annotation plugin** (`annotation.js`): All annotation-related functionality is now packaged independently. If your application doesn't require annotation editing, you can omit this module to reduce the overall bundle size. Note that if the annotation plugin is not loaded, annotation-related UI elements in the viewer configuration will be automatically ignored when creating the viewer. +* **Image PDF parser plugin** (`image-pdf.js`): A new lightweight PDF parsing plugin for loading pure image-based (JPEG and JBig2) PDFs without the overhead of the full PDF rendering engine. Combined with the newly added support for saving image-based PDFs in the default JavaScript, you can now handle image PDF workflows end-to-end without the PDF WASM module. Note that if you need to process PDFs containing vector graphics or require annotation features, the full PDF WASM module will be automatically loaded when needed. ### WASM Splitting & On-Demand Loading From 79f785f82d70b8efcc51a7f41e8df11ca110173b Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Mon, 27 Jul 2026 11:05:35 +0800 Subject: [PATCH 05/51] add plugin related errors --- api/errorlist.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/api/errorlist.md b/api/errorlist.md index e8b7a3c..9a26416 100644 --- a/api/errorlist.md +++ b/api/errorlist.md @@ -58,7 +58,7 @@ permalink: /api/errorlist.html -80205 | The pageData has been destroyed. -80206 | The DocTextSearcher has been destroyed. -## Viewer Releated Errors +## Viewer Related Errors Error Code | Error Message ---------- | ------------------------------------------------------------ @@ -90,7 +90,7 @@ permalink: /api/errorlist.html -80327 | The specified annotation(s) are not on the specified page or do not exist. -80328 | Rectangle-type redaction requires exactly one rect. -## Camera Releated Errors +## Camera Related Errors Error Code | Error Message ---------- | ------------------------------------------- @@ -103,6 +103,13 @@ permalink: /api/errorlist.html -80406 | The selected camera is denied by browser. -80407 | No bound container. +## Plugin Related Errors + + Error Code | Error Message +------------|---------------- + -80500 | The '<%param%>' plugin is not installed. + -80501 | Some elements are ignored because the required plugin is not installed. + ## Wasm Error From fd27906c4188cbcadadce746a20263d95c1973fd Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Mon, 27 Jul 2026 11:07:47 +0800 Subject: [PATCH 06/51] add error for camera plugin --- api/class/captureviewer.md | 1 + api/namespace/ddv.md | 1 + 2 files changed, 2 insertions(+) diff --git a/api/class/captureviewer.md b/api/class/captureviewer.md index 7de65e7..39ba2b0 100644 --- a/api/class/captureviewer.md +++ b/api/class/captureviewer.md @@ -123,6 +123,7 @@ const captureViewer = new Dynamsoft.DDV.CaptureViewer({ -80005 | Domain does not match the domain bound to the *XXX(LicenseModuleName)* module license. -80050 | DDV.Core.init() has not been set up yet. -80051 | DDV.Core.init() has not been completed. + -80500 | The '<%param%>' plugin is not installed. **Warning** diff --git a/api/namespace/ddv.md b/api/namespace/ddv.md index 2cd18b2..aca863c 100644 --- a/api/namespace/ddv.md +++ b/api/namespace/ddv.md @@ -103,6 +103,7 @@ type HandlerType = "documentBoundariesDetect"|"imageFilter"; -80100 | *XXX(API)*: *XXX(ParameterName)* is invalid. -80102 | *XXX(API)*: *XXX(ParameterName)* is missing. -80103 | *XXX(API)*: The value for *XXX(ParameterName)* is not supported. + -80500 | The '<%param%>' plugin is not installed. **Remark** From bd77627a02dfa148c0053b28bc8ff8ef119e34d7 Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Mon, 27 Jul 2026 11:23:42 +0800 Subject: [PATCH 07/51] api: clarify annotationManager is undefined without annotation plugin --- api/class/annotationmanager.md | 2 ++ api/namespace/ddv.md | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/api/class/annotationmanager.md b/api/class/annotationmanager.md index cb72734..4c4c9b5 100644 --- a/api/class/annotationmanager.md +++ b/api/class/annotationmanager.md @@ -14,6 +14,8 @@ permalink: /api/class/annotationmanager.html The `Dynamsoft.DDV.annotationManager` instance will be created automatically as soon as DDV is initialized. Please refer to [`annotationManager`]({{ site.api }}namespace/ddv.html#static-annotationmanager). +Please note that it is `undefined` if the annotation plugin is not installed. + ## API Index **Methods** diff --git a/api/namespace/ddv.md b/api/namespace/ddv.md index aca863c..19aad94 100644 --- a/api/namespace/ddv.md +++ b/api/namespace/ddv.md @@ -131,7 +131,13 @@ const docManager = Dynamsoft.DDV.documentManager; ### `` annotationManager -[`AnnotationManager`]({{ site.api }}class/annotationmanager.html) instance. +[`AnnotationManager`]({{ site.api }}class/annotationmanager.html) instance. It is `undefined` if the annotation plugin is not installed. + +**Syntax** + +```typescript +annotationManager?: AnnotationManager; +``` **Code Snippet** From 813f13c4383f2eae0cd5476ba1cc12345221ad8b Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Mon, 27 Jul 2026 14:25:11 +0800 Subject: [PATCH 08/51] add plugin warning for getDefaultUiConfig --- api/namespace/ddv.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/namespace/ddv.md b/api/namespace/ddv.md index 19aad94..1acb96e 100644 --- a/api/namespace/ddv.md +++ b/api/namespace/ddv.md @@ -194,6 +194,8 @@ const defaultEditUi = Dynamsoft.DDV.getDefaultUiConfig("editViewer"); -80100 | *XXX(API)*: *XXX(ParameterName)* is invalid. | `null` -80102 | *XXX(API)*: *XXX(ParameterName)* is missing. | `null` -80103 | *XXX(API)*: The value for *XXX(ParameterName)* is not supported.| `null` + -80501 | Some elements are ignored because the required plugin is not installed.| `null` + ### `` addFonts() From 4344260961438422edaaf805a6ba34073c7a0ee1 Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Mon, 27 Jul 2026 14:34:44 +0800 Subject: [PATCH 09/51] add descriptions for EnumLineEnding and EnumStampIcon --- api/enumeration-type/enumlineending.md | 2 ++ api/enumeration-type/enumstampicon.md | 3 +++ 2 files changed, 5 insertions(+) diff --git a/api/enumeration-type/enumlineending.md b/api/enumeration-type/enumlineending.md index 8f95dbf..6968646 100644 --- a/api/enumeration-type/enumlineending.md +++ b/api/enumeration-type/enumlineending.md @@ -12,6 +12,8 @@ permalink: /api/enumeration-type/enumlineending.html # EnumLineEnding +Enumeration for line annotation's ending. Check [LineAnnotationOptions](/api/interface/annotationinterface/lineannotationoptions.md). It is undefined if the annotation plugin is not installed. + ```typescript enum EnumLineEnding { NONE = "none", diff --git a/api/enumeration-type/enumstampicon.md b/api/enumeration-type/enumstampicon.md index 27fd89d..cd9c8e7 100644 --- a/api/enumeration-type/enumstampicon.md +++ b/api/enumeration-type/enumstampicon.md @@ -12,6 +12,9 @@ permalink: /api/enumeration-type/enumstampicon.html # EnumStampIcon +Enumeration for stamp annotation icon. It is undefined if the annotation plugin is not installed. + + ```typescript enum EnumStampIcon { REJECTED = "rejected", From efdcc6ebe028e032952481dfc4740a64d655eef3 Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Mon, 27 Jul 2026 14:39:05 +0800 Subject: [PATCH 10/51] loadAnnotations related errors and notes --- api/enumeration-type/enumannnotationrendermode.md | 2 +- api/interface/idocument/index.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/api/enumeration-type/enumannnotationrendermode.md b/api/enumeration-type/enumannnotationrendermode.md index 712afd6..108455b 100644 --- a/api/enumeration-type/enumannnotationrendermode.md +++ b/api/enumeration-type/enumannnotationrendermode.md @@ -16,6 +16,6 @@ permalink: /api/enumeration-type/enumannotationrendermode.html enum EnumAnnotationRenderMode { NO_ANNOTATIONS = "noAnnotations", // default, means that the annotations in the PDF file will not be loaded RENDER_ANNOTATIONS = "renderAnnotations", // means that the annotations in the PDF file will be rendered - LOAD_ANNOTATIONS = "loadAnnotations", // means that the annotations in the PDF file will be loaded normally, a valid PDF Annotation license is requested + LOAD_ANNOTATIONS = "loadAnnotations", // means that the annotations in the PDF file will be loaded normally, a valid PDF Annotation license is requested and the annotation plugin has to be installed } ``` diff --git a/api/interface/idocument/index.md b/api/interface/idocument/index.md index 005ed20..0543e82 100644 --- a/api/interface/idocument/index.md +++ b/api/interface/idocument/index.md @@ -179,6 +179,7 @@ await firstDoc.loadSource([source]); -80202 | Failed to read the PDF file because it's encrypted and the correct password is not provided. -80203 | Failed to read some annotations because they are not supported by Dynamsoft Document Viewer so far. -80204 | PDFs containing XFA (XML Forms Architecture) forms are not supported. + -80500 | The '<%param%>' plugin is not installed. ### getPageData() @@ -265,6 +266,7 @@ await firstDoc.updatePage(firstDoc.pages[0], source); -80202 | Failed to read the PDF file because it's encrypted and the correct password is not provided. -80203 | Failed to read some annotations because they are not supported by Dynamsoft Document Viewer so far. -80204 | PDFs containing XFA (XML Forms Architecture) forms are not supported. + -80500 | The '<%param%>' plugin is not installed. ### setPageCustomData() From 2211377e3ca7a6b9eee17c66e9def4fc1832d7f2 Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Mon, 27 Jul 2026 14:41:45 +0800 Subject: [PATCH 11/51] add plugin exception for annotation mode and tool mode --- api/class/editviewer.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/api/class/editviewer.md b/api/class/editviewer.md index 7a3b834..a82318a 100644 --- a/api/class/editviewer.md +++ b/api/class/editviewer.md @@ -546,6 +546,12 @@ editViewer.toolMode = "crop"; -80100 | *XXX(API)*: *XXX(ParameterName)* is invalid. -80103 | *XXX(API)*: The value for *XXX(ParameterName)* is not supported. +**Exception** + + Error Code | Error Message +--------|----------------------------------------------------- + -80500 | The '<%param%>' plugin is not installed. + **Remark** - If `toolMode` is set to `annotation`, can use [`annotationMode`](#annotationmode) to clarify the specific operation. @@ -580,6 +586,13 @@ editViewer.annotationMode = "select"; -80100 | *XXX(API)*: *XXX(ParameterName)* is invalid. -80103 | *XXX(API)*: The value for *XXX(ParameterName)* is not supported. +**Exception** + + Error Code | Error Message +--------|----------------------------------------------------- + -80500 | The '<%param%>' plugin is not installed. + + **Remark** - It only take effect when [`toolMode`](#toolmode) is `annotation`. From a232093c11857425b287cf36653a5300e861e703 Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Mon, 27 Jul 2026 14:44:16 +0800 Subject: [PATCH 12/51] add plugin exception for annotation-related methods --- api/class/editviewer.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/api/class/editviewer.md b/api/class/editviewer.md index a82318a..e1a23e0 100644 --- a/api/class/editviewer.md +++ b/api/class/editviewer.md @@ -317,6 +317,12 @@ const pageStyle = editViewer.getStyle("pageStyle"); -80102 | *XXX(API)*: *XXX(ParameterName)* is missing. | `null` -80103 | *XXX(API)*: The value for *XXX(ParameterName)* is not supported. | `null` +**Exception** + + Error Code | Error Message +--------|----------------------------------------------------- + -80500 | The '<%param%>' plugin is not installed. + ### getVisiblePagesInfo() Get the visible pages info. @@ -391,6 +397,11 @@ type EditViewerStyleName = "canvasStyle" | "pageStyle" | "currentPageStyle" | "q -80102 | *XXX(API)*: *XXX(ParameterName)* is missing. | `false` -80103 | *XXX(API)*: The value for *XXX(ParameterName)* is not supported. | `false` +**Exception** + + Error Code | Error Message +--------|----------------------------------------------------- + -80500 | The '<%param%>' plugin is not installed. **Remark** @@ -551,7 +562,7 @@ editViewer.toolMode = "crop"; Error Code | Error Message --------|----------------------------------------------------- -80500 | The '<%param%>' plugin is not installed. - + **Remark** - If `toolMode` is set to `annotation`, can use [`annotationMode`](#annotationmode) to clarify the specific operation. @@ -903,6 +914,12 @@ setAnnotationDrawingStyle(config: AnnotationDrawingStyleConfig): boolean; | ---------- | -------------------------------------------- | ---------------- | | -80100 | *XXX(API)*: *XXX(ParameterName)* is invalid. | `false` | | -80102 | *XXX(API)*: *XXX(ParameterName)* is missing. | `false` | + +**Exception** + + Error Code | Error Message +--------|----------------------------------------------------- + -80500 | The '<%param%>' plugin is not installed. ### selectAnnotations() @@ -939,6 +956,12 @@ selectAnnotations(annotationUids: string[]): boolean; | -80320 | Unknown annotation or incomplete annotation cannot be selected. | `false` | | -80321 | Flattened annotation cannot be selected. | `false` | +**Exception** + + Error Code | Error Message +--------|----------------------------------------------------- + -80500 | The '<%param%>' plugin is not installed. + ### getSelectedAnnotations() Get selected annotation(s). @@ -966,6 +989,12 @@ const selectAnnots = editViewer.getSelectAnnotations(); -80304 | No document opened. | `[]` -80305 | There is no image in the current document. | `[]` +**Exception** + + Error Code | Error Message +--------|----------------------------------------------------- + -80500 | The '<%param%>' plugin is not installed. + ### getAnnotationDrawingStyle() Get the annotation drawing style. @@ -980,6 +1009,11 @@ getAnnotationDrawingStyle(): AnnotationDrawingStyleConfig; An [`AnnotationDrawingStyleConfig`](/api/interface/styleinterface/annotationdrawingstyleconfig.md) object. +**Exception** + + Error Code | Error Message +--------|----------------------------------------------------- + -80500 | The '<%param%>' plugin is not installed. ## Display Control From 2ed936d85fccafa22de35bed5c2c8d2198013209 Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Mon, 27 Jul 2026 14:58:57 +0800 Subject: [PATCH 13/51] update release notes --- releasenotes/index.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/releasenotes/index.md b/releasenotes/index.md index 0780418..04dbcdd 100644 --- a/releasenotes/index.md +++ b/releasenotes/index.md @@ -35,6 +35,16 @@ The default image processing WASM module has been split to improve load times an * For pure image-based PDFs, you can use the lightweight [Image PDF parser plugin](#modular-feature-packages) instead, eliminating the need to load the full PDF WASM module. * This significantly reduces the initial download size, especially for camera-based document scanning scenarios where TIFF/vector PDF processing may not be needed. +### Removed + +`CustomViewer` has been removed. + +### Other Improvements + +* Improved the alignment setting of text and redaction annotations by remembering the applied alignment via UI. +* Improved the speed of [`loadSource`](/api/interface/idocument/index.md#loadsource). +* Improved the rendering of text annotations. + ## 4.0 (04/21/2026) From a1238735a905a3d904b4aad1a673d9517ff52067 Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Mon, 27 Jul 2026 15:07:16 +0800 Subject: [PATCH 14/51] use JBIG2 --- releasenotes/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releasenotes/index.md b/releasenotes/index.md index 04dbcdd..ab014d6 100644 --- a/releasenotes/index.md +++ b/releasenotes/index.md @@ -24,7 +24,7 @@ The following features are now packaged as standalone plugins that can be loaded * **Camera plugin** (`camera.js`): The Capture Viewer's camera-related JavaScript is now packaged independently. Only applications that need camera capture functionality need to load this module. * **Annotation plugin** (`annotation.js`): All annotation-related functionality is now packaged independently. If your application doesn't require annotation editing, you can omit this module to reduce the overall bundle size. Note that if the annotation plugin is not loaded, annotation-related UI elements in the viewer configuration will be automatically ignored when creating the viewer. -* **Image PDF parser plugin** (`image-pdf.js`): A new lightweight PDF parsing plugin for loading pure image-based (JPEG and JBig2) PDFs without the overhead of the full PDF rendering engine. Combined with the newly added support for saving image-based PDFs in the default JavaScript, you can now handle image PDF workflows end-to-end without the PDF WASM module. Note that if you need to process PDFs containing vector graphics or require annotation features, the full PDF WASM module will be automatically loaded when needed. +* **Image PDF parser plugin** (`image-pdf.js`): A new lightweight PDF parsing plugin for loading pure image-based (JPEG and JBIG2) PDFs without the overhead of the full PDF rendering engine. Combined with the newly added support for saving image-based PDFs in the default JavaScript, you can now handle image PDF workflows end-to-end without the PDF WASM module. Note that if you need to process PDFs containing vector graphics or require annotation features, the full PDF WASM module will be automatically loaded when needed. ### WASM Splitting & On-Demand Loading From 27f4e6c4dbac0c2957af260bae9338ee2a4d5c5f Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Mon, 27 Jul 2026 15:09:15 +0800 Subject: [PATCH 15/51] add annotation to undo/redo's note --- api/class/editviewer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/class/editviewer.md b/api/class/editviewer.md index 7a3b834..86b41cd 100644 --- a/api/class/editviewer.md +++ b/api/class/editviewer.md @@ -1362,7 +1362,7 @@ editViewer.setCropRect(rect); ### undo() -> *This method takes effect only for [crop](#crop), [rotate](#rotate) operations.* +> *This method takes effect only for [crop](#crop), [rotate](#rotate) and annotation operations.* Undo the last editing operation. @@ -1393,7 +1393,7 @@ editViewer.undo(); ### redo() -> *This method takes effect only for [crop](#crop), [rotate](#rotate) operations.* +> *This method takes effect only for [crop](#crop), [rotate](#rotate) and annotation operations.* Redo the last undo operation. From 57e2f381bee48d3b87bd0d71d568c1caccf7b644 Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Mon, 27 Jul 2026 15:15:23 +0800 Subject: [PATCH 16/51] remove custom viewer --- _data/full_tree.yml | 1 + _includes/sidelist-apis-v4.0.0.html | 181 ++++++++++++++++ _includes/sidelist-apis.html | 1 - _old/api/class/customviewer.md | 306 ++++++++++++++++++++++++++++ api/class/index.md | 1 - api/index.md | 1 - 6 files changed, 488 insertions(+), 3 deletions(-) create mode 100644 _includes/sidelist-apis-v4.0.0.html create mode 100644 _old/api/class/customviewer.md diff --git a/_data/full_tree.yml b/_data/full_tree.yml index 3ae6998..b64d13d 100644 --- a/_data/full_tree.yml +++ b/_data/full_tree.yml @@ -13,4 +13,5 @@ tree_file_list: - sidelist-apis-v1.1.html - sidelist-apis-v2.1.html - sidelist-apis-v3.2.1.html + - sidelist-apis-v4.0.0.html diff --git a/_includes/sidelist-apis-v4.0.0.html b/_includes/sidelist-apis-v4.0.0.html new file mode 100644 index 0000000..e30c966 --- /dev/null +++ b/_includes/sidelist-apis-v4.0.0.html @@ -0,0 +1,181 @@ +
  • API Reference + +
  • \ No newline at end of file diff --git a/_includes/sidelist-apis.html b/_includes/sidelist-apis.html index 5bebd70..fa1b80c 100644 --- a/_includes/sidelist-apis.html +++ b/_includes/sidelist-apis.html @@ -17,7 +17,6 @@
  • CaptureViewer
  • PerspectiveViewer
  • BrowseViewer
  • -
  • CustomViewer
  • Advanced
    • ImageFilter
    • diff --git a/_old/api/class/customviewer.md b/_old/api/class/customviewer.md new file mode 100644 index 0000000..59c9b60 --- /dev/null +++ b/_old/api/class/customviewer.md @@ -0,0 +1,306 @@ +--- +layout: default-layout +needAutoGenerateSidebar: true +needGenerateH3Content: true +noTitleIndex: true +title: Dynamsoft Document Viewer API Reference - CustomViewer Class +keywords: Documentation, Dynamsoft Document Viewer, API Reference, CustomViewer Class +breadcrumbText: CustomViewer Class +description: Dynamsoft Document Viewer Documentation API Reference CustomViewer Class Page +--- + +# CustomViewer Class + +Custom Viewer does not have any built-in UI or functionality, it is used for creating your own viewer. + +## API Index + +**Create and Destroy Instances** + +| API Name | Description | +| ------------ | --------------------------------------------- | +| [`CustomViewer()`](#customviewer) | Default constructor of a `CustomViewer` instance. | +| [`destroy()`](#destroy) | Destroy the `CustomViewer` instance. | + +**Viewer Control** + +| API Name | Description | +| --------------------- | ------------------------------------------------------------ | +| [`bindContainer()`](#bindcontainer) | Bind the viewer to the specified container. | +| [`unbindContainer()`](#unbindcontainer) | Unbind the viewer from the specified container. | +| [`isBoundContainer`](#isboundcontainer) | Return whether the viewer is bound to a container. | +| [`getUiConfig()`](#getuiconfig) | Get current `UiConfig` object. | +| [`updateUiConfig()`](#updateuiconfig) | Update `UiConfig` object. | +| [`show()`](#show) | Show the viewer. | +| [`hide()`](#hide) | Hide the viewer. | +| [`isVisible`](#isvisible) | Return whether the viewer is shown or hidden. | + +**Events** + +| API Name | Description | +| -------- | -------------------------------------------------- | +| [`on()`](#on) | Bind a listener to the specified event. | +| [`off()`](#off) | Unbind event listener(s) from the specified event. | + +### CustomViewer() + +Default constructor of a `CustomViewer` instance. + +**Syntax** + +```typescript +new Dynamsoft.DDV.CustomViewer(options?: CustomViewerConstructorOptions); +``` + +**Parameters** + +`options`: The constructor options for a `CustomViewer` instance. Please refer to [`CustomViewerConstructorOptions`]({{ site.api }}interface/customviewerconstructoroptions.html). + +**Code Snippet** + +```typescript +const customViewer = new Dynamsoft.DDV.CustomViewer({ + container: document.getElementById("viewer"), +}); +``` + +**Exception** + + Error Code | Error Message +--------|----------------------------------------------------- + -80100 | *XXX(API)*: *XXX(ParameterName)* is invalid. + -80001 | License string is invalid. + -80002 | *XXX(LicenseModuleName)* module license has expired. + -80003 | *XXX(LicenseModuleName)* module license is missing. + -80004 | *XXX(LicenseModuleName)* module license version does not match. + -80005 | Domain does not match the domain bound to the *XXX(LicenseModuleName)* module license. + -80050 | DDV.Core.init() has not been set up yet. + -80051 | DDV.Core.init() has not been completed. + +### destroy() + +Destroy the `CustomViewer` instance. + +**Syntax** + +```typescript +destroy(): void; +``` + +**Code Snippet** + +```typescript +customViewer.destroy(); +``` + +## Viewer Control + +### bindContainer() + +Bind the viewer to the specified container. + +**Syntax** + +```typescript +bindContainer(container: string | HTMLElement): void; +``` + +**Parameters** + +`container`: The container which is used to show the viewer. Its `id` or `HTMLElement` is acceppted. + +**Code Snippet** + +```typescript +// Assume there is a container with id "viewercontainer" on the page. +customViewer.bindContainer("viewercontainer"); +``` + +**Exception** + + Error Code | Error Message +--------|----------------------------------------------------- + -80100 | *XXX(API)*: *XXX(ParameterName)* is invalid. + -80102 | *XXX(API)*: *XXX(ParameterName)* is missing. + -80301 | The specified container does not exist. + +**Remark** + +- A viewer can only be bound to one container at once. If you bind the viewer to another container when it has been bound to a container, the viewer will be bound to the new container and unbound from the old container automatically. + +### unbindContainer() + +Unbind the viewer from the specified container. + +**Syntax** + +```typescript +unbindContainer(): void; +``` + +**Code Snippet** + +```typescript +customViewer.unbindContainer(); +``` + +### isBoundContainer + +Return whether the viewer is bound to a container. + +**Syntax** + +```typescript +readonly isBoundContainer: boolean; +``` + +### getUiConfig() + +Get current `UiConfig` object. + +**Syntax** + +```typescript +getUiConfig(): UiConfig; +``` + +**Return Value** + +The [`UiConfig`]({{ site.api }}interface/uiconfig.html) object. + +**Code Snippet** + +```typescript +const viewerUi = customViewer.getUiConfig(); +``` + +### updateUiConfig() + +Update `UiConfig` object. + +**Syntax** + +```typescript +updateUiConfig(uiConfig: UiConfig): boolean; +``` + +**Parameters** + +`uiConfig`: The [`UiConfig`]({{ site.api }}interface/uiconfig.html) to update. + +**Return Value** + +`true`: Successfully. + +`false`: Failed. + +**Warning** + + Error Code | Error Message | API Return Value +--------|-----------------------------------------------------|---------------------- + -80100 | *XXX(API)*: *XXX(ParameterName)* is invalid. | `false` + -80102 | *XXX(API)*: *XXX(ParameterName)* is missing. | `false` + -80313 | The element *XXX(ElementName)* is not supported in *XXX(ClassName)* class. | `false` + +**Remark** + +- The updates are independent of whether the viewer is displayed and are updated in real time. + +### show() + +Show the viewer. + +**Syntax** + +```typescript +show(): void; +``` + +**Code Snippet** + +```typescript +customViewer.show(); +``` + +**Remark** + +- The viewer is shown automatically when it is created. + +### hide() + +Hide the viewer. + +**Syntax** + +```typescript +hide(): void; +``` + +**Code Snippet** + +```typescript +customViewer.hide(); +``` + +### isVisible + +Return whether the viewer is shown or hidden. + +**Syntax** + +```typescript +readonly isVisible: boolean; +``` + +**Remark** + +- The viewer is shown automatically when it is created which means the default value of `isVisible` is `true`. + +## Events + +### on() + +Bind a listener to the specified event. + +**Syntax** + +```typescript +on(eventName: EventName, listener:(event:EventObject)=>void): void; +``` + +**Parameters** + +`eventName`: Specify the event name. It can be a custom event name configured through [`UiConfig`-`events`]({{ site.api }}interface/uiconfig.html#events). + +`listener`: Specify the listener. + +**Warning** + + Error Code | Error Message +--------|----------------------------------------------------- + -80100 | *XXX(API)*: *XXX(ParameterName)* is invalid. + -80102 | *XXX(API)*: *XXX(ParameterName)* is missing. + + +### off() + +Unbind event listener(s) from the specified event. + +**Syntax** + +```typescript +off(eventName: EventName, listener?:(event:EventObject)=>void): void; +``` + +**Parameters** + +`eventName`: Specify the event name. It can be a custom event name configured through [`UiConfig`-`events`]({{ site.api }}interface/uiconfig.html#events). + +`listener`: Specify the listener. If no listener is specified, unbind all event listeners from the specified event. + +**Warning** + + Error Code | Error Message +--------|----------------------------------------------------- + -80100 | *XXX(API)*: *XXX(ParameterName)* is invalid. + -80102 | *XXX(API)*: *XXX(ParameterName)* is missing. \ No newline at end of file diff --git a/api/class/index.md b/api/class/index.md index 9edea44..73c6a1e 100644 --- a/api/class/index.md +++ b/api/class/index.md @@ -24,7 +24,6 @@ Under the namespace Dynamsoft.DDV, Dynamsoft Document Viewer JavaScript library - [CaptureViewer](/api/class/captureviewer.md) - [PerspectiveViewer](/api/class/perspectiveviewer.md) - [BrowseViewer](/api/class/browseviewer.md) -- [CustomViewer](/api/class/customviewer.md) ## Annotation diff --git a/api/index.md b/api/index.md index 58976b3..207a844 100644 --- a/api/index.md +++ b/api/index.md @@ -26,7 +26,6 @@ permalink: /api/index.html - [CaptureViewer]({{ site.api }}class/captureviewer.html) - [PerspectiveViewer]({{ site.api }}class/perspectiveviewer.html) - [BrowseViewer]({{ site.api }}class/browseviewer.html) - - [CustomViewer]({{ site.api }}class/customviewer.html) - Advanced - [ImageFilter]({{ site.api }}class/advanced/imagefilter.html) - [DocumentDetect]({{ site.api }}class/advanced/documentdetect.html) From 1a69038c82940e4f063b09ccbc87bca9db8fe78b Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Mon, 27 Jul 2026 15:16:58 +0800 Subject: [PATCH 17/51] update browse viewer introduction --- introduction/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/introduction/index.md b/introduction/index.md index f4465b7..cc7a518 100644 --- a/introduction/index.md +++ b/introduction/index.md @@ -65,5 +65,5 @@ Dynamsoft Document Viewer is built to support a wide range of document-centric w * **Edit Viewer**: Enables viewing and editing of documents with annotation support. * **Capture Viewer**: Integrates camera controls for streamlined, continuous capture workflows. * **Perspective Viewer**: Allows document cropping with perspective transformation. -* **Browse Viewer**: Suitable for previewing multi-page documents or navigating document collections. +* **Browse Viewer**: Suitable for previewing and reordering multi-page documents. From 909ec2c661fc57d5f8664e293282d1d83c13c6fd Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Mon, 27 Jul 2026 16:05:30 +0800 Subject: [PATCH 18/51] add plugins in add dependency --- gettingstarted/add_dependency.md | 42 +++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/gettingstarted/add_dependency.md b/gettingstarted/add_dependency.md index 3ef4efd..e680901 100644 --- a/gettingstarted/add_dependency.md +++ b/gettingstarted/add_dependency.md @@ -28,6 +28,14 @@ The simplest way to include the SDK is to use either the [jsDelivr](https://jsde ``` + With plugins: + + ```html + + + + ``` + - UNPKG ```html @@ -35,6 +43,14 @@ The simplest way to include the SDK is to use either the [jsDelivr](https://jsde ``` + With plugins: + + ```html + + + + ``` + ## Host the SDK yourself Besides using the CDN, you can also download the Solution and host related files on your own website/server before including it in your application. @@ -65,6 +81,14 @@ Depending on how you downloaded the SDK and where you put it, you can typically ``` + With plugins: + + ```html + + + + ``` + or ```html @@ -72,9 +96,25 @@ or ``` + With plugins: + + ```html + + + + ``` + or ```typescript import { DDV } from 'dynamsoft-document-viewer'; import "dynamsoft-document-viewer/dist/ddv.css"; - ``` \ No newline at end of file + ``` + + With plugins: + + ```typescript + import { CameraPlugin } from 'dynamsoft-document-viewer/camera'; + import { AnnotationPlugin } from 'dynamsoft-document-viewer/annotation'; + import { ImagePdfParser } from 'dynamsoft-document-viewer/imagePdf'; + ``` From f42936918be62d4b2bbe724c37cec3b6d36d1625 Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Mon, 27 Jul 2026 16:06:18 +0800 Subject: [PATCH 19/51] update plugin name --- gettingstarted/add_dependency.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gettingstarted/add_dependency.md b/gettingstarted/add_dependency.md index e680901..c88843b 100644 --- a/gettingstarted/add_dependency.md +++ b/gettingstarted/add_dependency.md @@ -116,5 +116,5 @@ or ```typescript import { CameraPlugin } from 'dynamsoft-document-viewer/camera'; import { AnnotationPlugin } from 'dynamsoft-document-viewer/annotation'; - import { ImagePdfParser } from 'dynamsoft-document-viewer/imagePdf'; + import { ImagePdfParserPlugin } from 'dynamsoft-document-viewer/imagePdf'; ``` From 51fc2f8d6b0312c10f7ea052d17c3a868a02d422 Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Mon, 27 Jul 2026 16:29:40 +0800 Subject: [PATCH 20/51] add plugins and on-demand loading --- _includes/sidelist-features.html | 1 + features/index.md | 4 ++ features/plugins-and-on-demand-loading.md | 52 +++++++++++++++++++++++ gettingstarted/add_dependency.md | 1 + index.md | 1 + 5 files changed, 59 insertions(+) create mode 100644 features/plugins-and-on-demand-loading.md diff --git a/_includes/sidelist-features.html b/_includes/sidelist-features.html index 6dd7105..1157ae9 100644 --- a/_includes/sidelist-features.html +++ b/_includes/sidelist-features.html @@ -16,6 +16,7 @@ {% comment %}
    • Data synchronization
    • {% endcomment %}
  • +
  • Plugins and On-Demand Loading
  • Advanced
    • Image Filter
    • diff --git a/features/index.md b/features/index.md index 1d8e6fe..f27fbb8 100644 --- a/features/index.md +++ b/features/index.md @@ -48,6 +48,10 @@ Viewers are used to display the data. According to the different uses of viewers - [Custom Viewer]({{ site.features }}viewers/others.html#custom-viewer) {% comment %}- [Data synchronisation between viewers]({{ site.features }}viewers/datasync.html){% endcomment %} +## Plugins and On-Demand Loading + +[Plugins and on-demand loading](./plugins-and-on-demand-loading.md). + ## Advanced - [How to configure image filter]({{ site.features }}advanced/imagefilter.html) diff --git a/features/plugins-and-on-demand-loading.md b/features/plugins-and-on-demand-loading.md new file mode 100644 index 0000000..aa05e4f --- /dev/null +++ b/features/plugins-and-on-demand-loading.md @@ -0,0 +1,52 @@ +--- +layout: default-layout +needAutoGenerateSidebar: true +needGenerateH3Content: true +noTitleIndex: true +title: Dynamsoft Document Viewer Features - Plugins and On-Demand Loading +keywords: Documentation, Dynamsoft Document Viewer, Features, Plugins, On-Demand Loading +breadcrumbText: Plugins and On-Demand Loading +description: Dynamsoft Document Viewer Documentation Features - Plugins and On-Demand Loading +permalink: /features/plugins-and-on-demand-loading.html +--- + +# Plugins and On-Demand Loading + +Starting from version 5.0, Dynamsoft Document Viewer adopts a **pluggable architecture**. Features are packaged as standalone plugins, and WASM modules are split for on-demand loading — allowing you to load only what your application needs. + +## Plugins + +The following feature modules are provided as standalone plugins: + +### Camera Plugin + +File: `ddv-plugin-camera.js` | Import: `dynamsoft-document-viewer/camera` + +Provides the Capture Viewer's camera functionality, including video stream playback and image capture. Load this plugin only if your application requires camera capture. + +### Annotation Plugin + +File: `ddv-plugin-annotation.js` | Import: `dynamsoft-document-viewer/annotation` + +Provides all annotation-related functionality, including creating, editing, and managing annotations. If your application doesn't require annotation editing, you can omit this module to reduce the overall bundle size. + +When the annotation plugin is not loaded, annotation-related UI elements in the viewer configuration are automatically ignored. + +### Image PDF Parser Plugin + +File: `ddv-plugin-image-pdf.js` | Import: `dynamsoft-document-viewer/imagePdf` + +Provides lightweight PDF parsing for pure image-based PDFs (JPEG and JBIG2). Combined with the built-in support for saving image-based PDFs, this plugin enables image PDF workflows without the full PDF WASM module. + +## WASM On-Demand Loading + +The image processing WASM modules are split so that format-specific modules are loaded only when needed: + +- The core image processing WASM module covers common image formats and licensing. +- The **PDF and TIFF** WASM module (a single file covering both formats) is separated and loaded on demand — only when your application processes TIFF files or vector-based PDFs. +- For pure image-based PDFs, the [Image PDF parser plugin](#image-pdf-parser-plugin) can be used instead, eliminating the need to load the full PDF WASM module. +- This reduces the initial download size and memory usage, especially for camera-based scanning scenarios where TIFF/vector PDF processing may not be needed. + +## How to Load Plugins + +For details on how to include plugins in your project, refer to [Adding the dependency](/gettingstarted/add_dependency.md). diff --git a/gettingstarted/add_dependency.md b/gettingstarted/add_dependency.md index c88843b..3837f90 100644 --- a/gettingstarted/add_dependency.md +++ b/gettingstarted/add_dependency.md @@ -16,6 +16,7 @@ To use the SDK, we need to include the package below. - `dynamsoft-document-viewer`: Required, it provides functions to create the viewers. +It has several plugins that we can load on demand. Check [Plugins and On-Demand Loading](/features//plugins-and-on-demand-loading.md) to learn more. ## Use a CDN diff --git a/index.md b/index.md index 19689c0..9a3c60f 100644 --- a/index.md +++ b/index.md @@ -30,6 +30,7 @@ description: Dynamsoft Document Viewer Documentation Homepage - [Browse Viewer]({{ site.features }}viewers/others.html#browse-viewer) - [Custom Viewer]({{ site.features }}viewers/others.html#custom-viewer) {% comment %} - [Data synchronisation between viewers]({{ site.features }}viewers/datasync.html){% endcomment %} + - [Plugins and On-Demand Loading](/features/plugins-and-on-demand-loading.md) - Advanced - [Image Filter]({{ site.features }}advanced/imagefilter.html) - [Document Detection]({{ site.features }}advanced/documentdetect.html) From cc4672ab4ad0ea2bea3dabb8444de10a2d63304a Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Mon, 27 Jul 2026 16:38:19 +0800 Subject: [PATCH 21/51] update helloworld to use the annotation plugin --- gettingstarted/helloworld.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/gettingstarted/helloworld.md b/gettingstarted/helloworld.md index 13dfbee..e9bde84 100644 --- a/gettingstarted/helloworld.md +++ b/gettingstarted/helloworld.md @@ -43,7 +43,15 @@ We’ll build on this skeleton page: ## Adding the dependency -Please refer to [Adding the dependency]({{ site.gettingstarted }}add_dependency.html). +Add the dependency with the following code: + +```html + + + +``` + +You can refer to [Adding the dependency]({{ site.gettingstarted }}add_dependency.html). ## Define necessary HTML elements @@ -82,8 +90,10 @@ For HelloWorld, we define below elements. // You can request a 30-day trial key from https://www.dynamsoft.com/customer/license/trialLicense/?product=ddv Dynamsoft.DDV.Core.license = "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9"; Dynamsoft.DDV.Core.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-document-viewer@latest/dist/engine"; -// Preload DDV Resource +// Load all wasm files including the full PDF wasm. Comment out this to load wasm files on-demand. Dynamsoft.DDV.Core.loadWasm(); +// Load the annotation plugin. +Dynamsoft.DDV.use(Dynamsoft.DDV.AnnotationPlugin); await Dynamsoft.DDV.Core.init(); ``` @@ -109,6 +119,7 @@ const editViewer = new Dynamsoft.DDV.EditViewer({ DDV - HelloWorld + +``` + +## SDK initialization + +```javascript +// Public trial license which is valid for 24 hours +// You can request a 30-day trial key from https://www.dynamsoft.com/customer/license/trialLicense/?product=ddv +Dynamsoft.DDV.Core.license = "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9"; +Dynamsoft.DDV.Core.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-document-viewer@latest/dist/engine"; +// Preload DDV Resource +Dynamsoft.DDV.Core.loadWasm(); +await Dynamsoft.DDV.Core.init(); +``` + +## Create an edit viewer + +```javascript +// Create an edit viewer +const editViewer = new Dynamsoft.DDV.EditViewer({ + container: "container", + uiConfig: Dynamsoft.DDV.getDefaultUiConfig("editViewer"), +}); +``` + +## Review the complete code + +```html + + + + + + + DDV - HelloWorld + + + + + +
      + + + +``` diff --git a/_v4.0/gettingstarted/sys_requirements.md b/_v4.0/gettingstarted/sys_requirements.md new file mode 100644 index 0000000..b3fcf4c --- /dev/null +++ b/_v4.0/gettingstarted/sys_requirements.md @@ -0,0 +1,32 @@ +--- +layout: default-layout +needAutoGenerateSidebar: true +needGenerateH3Content: true +noTitleIndex: true +title: Dynamsoft Document Viewer Getting Started - System Requirements +keywords: Documentation, Dynamsoft Document Viewer, Getting Started, System Requirements +breadcrumbText: System Requirements +description: Dynamsoft Document Viewer Documentation Getting Started, System Requirements +--- + + +# System Requirements + +The SDK requires the following features to work: + +- `WebAssembly`, `Blob`, `URL`/`createObjectURL`, `Web Workers` + + The above four features are required for the SDK to work. + +## Supported Browsers + +The following table is a list of supported browsers based on the above requirements: + + | Browser Name | PC | Mobile | + | :----------: | :------------------------------: | :---------: | + | Chrome | v75+ | v75+ | + | Firefox | v69+ | v79+ | + | Safari | v14+ | v15+ | + | Edge | v79+ | v92+ | + +Apart from the browsers, the operating systems may impose some limitations of their own that could restrict the use of the SDKs. \ No newline at end of file diff --git a/_v4.0/index.md b/_v4.0/index.md new file mode 100644 index 0000000..3013cf5 --- /dev/null +++ b/_v4.0/index.md @@ -0,0 +1,61 @@ +--- +layout: home-page +title: Dynamsoft Document Viewer Documentation +keywords: Dynamsoft Document Viewer, documentation +description: Dynamsoft Document Viewer Documentation Homepage +--- + +# Dynamsoft Document Viewer + + +- [Introduction]({{site.introduction}}index.html) +- Getting Started + - [System Requirements]({{ site.gettingstarted }}sys_requirement.html) + - [Adding the dependency]({{ site.gettingstarted }}add_dependency.html) + - [SDK Initialization]({{ site.gettingstarted }}sdk_init.html) + - [Creating HelloWorld]({{ site.gettingstarted }}helloworld.html) + - Libraries and Frameworks + - [Angular](/gettingstarted/angular.md) + - [React](/gettingstarted/react.md) + - [Vue](/gettingstarted/vue.md) +- [Features]({{ site.features }}index.html) + - Data Management + - [Document Management]({{ site.features }}datamanagement/docmanagement.html) + - [Page Management]({{ site.features }}datamanagement/pagemanagement.html) + - [Annotation management]({{ site.features }}datamanagement/annotmanagement.html) + - Viewers + - [Edit Viewer]({{ site.features}}viewers/editviewer.html) + - [Capture Viewer]({{ site.features }}viewers/captureviewer.html) + - [Perspective Viewer]({{ site.features }}viewers/perspectiveviewer.html) + - [Browse Viewer]({{ site.features }}viewers/others.html#browse-viewer) + - [Custom Viewer]({{ site.features }}viewers/others.html#custom-viewer) + {% comment %} - [Data synchronisation between viewers]({{ site.features }}viewers/datasync.html){% endcomment %} + - Advanced + - [Image Filter]({{ site.features }}advanced/imagefilter.html) + - [Document Detection]({{ site.features }}advanced/documentdetect.html) +- [Viewer Configuration]({{ site.viewer }}index.html) + - [ViewerConfig]({{ site.viewer }}viewerconfig.html) + - [Structure]({{ site.viewer }}viewerconfig.html#structure) + - [Default ViewerConfig]({{ site.viewer }}viewerconfig.html#default-viewerconfig) + - [How to customize viewer]({{ site.viewer }}customize.html) + - [Viewer Style]({{ site.viewer }}customize.html#viewer-style) + - [Viewer properties]({{ site.viewer }}customize.html#viewer-properties) +- [User Interface]({{ site.ui }}index.html) + - [UiConfig]({{ site.ui }}uiconfig.html) + - [Structure]({{ site.ui }}uiconfig.html#structure) + - [How to configure]({{ site.ui }}uiconfig.html#how-to-configure) + - [Reference]({{ site.ui }}uiconfig.html#reference) + - [Default Elements]({{ site.ui }}default_elements.html) + - [Default User Interface]({{ site.ui }}default_ui.html) + - [Edit viewer]({{ site.ui }}default_ui.html#edit-viewer) + - [Capture viewer]({{ site.ui }}default_ui.html#capture-viewer) + - [Perspective viewer]({{ site.ui }}default_ui.html#perspective-viewer) + - [Browse viewer]({{ site.ui }}default_ui.html#browse-viewer) + - [How to customize UI]({{ site.ui }}customize/index.html) + - [Layout]({{ site.ui }}customize/layout.html) + - [Elements]({{ site.ui }}customize/elements.html) + - [Update UI dynamically]({{ site.ui }}customize/dynamically.html) +- [API Reference]({{ site.api }}index.html) +- [Release Notes]({{ site.releasenotes }}index.html) +- [FAQ]({{ site.faq }}index.html) +- [Upgrade Guide](/upgrade-guide/index.md) \ No newline at end of file diff --git a/_v4.0/introduction/index.md b/_v4.0/introduction/index.md new file mode 100644 index 0000000..f4465b7 --- /dev/null +++ b/_v4.0/introduction/index.md @@ -0,0 +1,69 @@ +--- +layout: default-layout +needAutoGenerateSidebar: true +needGenerateH3Content: true +noTitleIndex: true +title: JavaScript PDF Viewer SDK | Dynamsoft Document Viewer +keywords: Documentation, Dynamsoft Document Viewer, Introduction +breadcrumbText: Introduction +description: Powerful JavaScript PDF viewer & document viewer SDK. Integrate seamless document viewing into your web apps with Dynamsoft Document Viewer. +--- + +# Introduction to Dynamsoft Document Viewer + +Dynamsoft Document Viewer is a browser-based JavaScript SDK designed for viewing and editing images and PDFs. It provides a wide range of functionalities, including PDF annotation, page manipulation, image quality enhancement, and document saving. To see it in action, please visit this [online demo](https://demo.dynamsoft.com/document-viewer/). + +## Security + +Dynamsoft Document Viewer does not rely on any external third-party JavaScript library. All processing, such as rendering and editing, is securely performed within the browser. This architecture eliminates the need for a server-side backend, ensuring security compliance and scalability. + +The SDK's [redaction](/features/datamanagement/annotmanagement.md#redaction) feature goes beyond visual masking - it permanently removes the underlying data from the document. This ensures that sensitive information (PII, classified text, financial data) cannot be recovered or leaked, making it ideal for industries with strict compliance requirements like legal, healthcare, and government. + +## Browser and Platform Compatibility + +Dynamsoft Document Viewer is designed to work seamlessly across different browsers and platforms. It is compatible with major browsers like Chrome, Firefox, Safari, and Edge, ensuring a consistent user experience. Additionally, it supports various operating systems, including Windows, macOS, Linux, iOS, and Android, allowing users to access documents from any device. + +## Supported File Types + +Users can open, edit, and save PDFs, as well as images in various formats, such as JPEG, PNG, and TIFF. + +## Annotation Types + +Dynamsoft Document Viewer supports a variety of annotation types to enhance document interaction and collaboration. Users can add, edit, and delete annotations such as: + +- text +- highlight +- underline +- strikeout +- shape +- stamp +- freehand drawing +- redaction + +## Data Management Concepts + +Dynamsoft Document Viewer organizes data using two main concepts: "document" and "page." A document can contain one or multiple pages, and each page must belong to a single document. + +- Page: The smallest unit of data management. Each page has a unique page ID. +- Document: A collection of pages, each with a unique doc ID. Documents collectively make up the entire data set. + +Managing data, therefore, involves managing documents and pages. + +- [Document Management]({{ site.features }}datamanagement/docmanagement.html) +- [Page Management]({{ site.features }}datamanagement/pagemanagement.html) + +If you are using the default UI of DDV, data processing and management are handled internally. + +## UI Customization + +The SDK offers extensive customization options, enabling developers to tailor the UI to meet specific application needs and branding requirements. + +## Designed to Support Diverse Document Workflows + +Dynamsoft Document Viewer is built to support a wide range of document-centric workflows with its document viewing, editing, and scanning features. It has four built-in viewer types to suit different use cases: + +* **Edit Viewer**: Enables viewing and editing of documents with annotation support. +* **Capture Viewer**: Integrates camera controls for streamlined, continuous capture workflows. +* **Perspective Viewer**: Allows document cropping with perspective transformation. +* **Browse Viewer**: Suitable for previewing multi-page documents or navigating document collections. + diff --git a/_v4.0/releasenotes/index.md b/_v4.0/releasenotes/index.md new file mode 100644 index 0000000..ff91c17 --- /dev/null +++ b/_v4.0/releasenotes/index.md @@ -0,0 +1,414 @@ +--- +layout: default-layout +needAutoGenerateSidebar: true +needGenerateH3Content: true +noTitleIndex: true +title: Dynamsoft Document Viewer - Release Notes +keywords: Documentation, Dynamsoft Document Viewer, Release Notes +breadcrumbText: Release Notes +description: Dynamsoft Document Viewer Documentation Release Notes +--- + +# Release Notes + +## 4.0 (04/21/2026) + +### New Features + +* Added support for [redaction annotation](/features/datamanagement/annotmanagement.md#redaction). +* Changed PDF rendering mode to high-fidelity rendering. + +### API Changes + +* Added redaction-related interfaces: [`Redaction`](/api/class/annotation/redaction.md), [`RedactionAnnotationOptions`](/api/interface/annotationinterface/redactionannotationoptions.md), [`RedactionStyle`](/api/interface/annotationinterface/redactionstyle.md), [`applyRedactions()`](/api/class/annotationmanager.md#applyredactions). +* Added redaction-related UI elements. +* Added `printPreparation` to progress info and renamed attribute `current` to `processed` for `LoadSourceInfo` and `SaveSourceInfo`. See [`InfoObject`](/api/interface/infoobject.md). + +### Improvements + +Updated third-party libraries to enhance security. + +### Bug Fixes + +* Fixed loading of interlaced PNGs. +* Fixed loading of some non-standard PDFs with redundant trailing data. + + + +## 3.2.1 (03/10/2026) + +Updated third-party libraries to enhance security. + +## 3.2 (01/13/2026) + +### Improvements + +* Improved the context of search results, which now display the word before the searched word. +* Improved the rendering of selected annotations by reducing the number of items to draw. +* Improved the performance of selecting multiple annotations. +* Added a consistency check between the JavaScript and resource file versions. +* Added support for pinch-to-zoom under `textSelection` mode of `EditViewer` for mobile. +* Updated third-party libraries to enhance security. + +### Bug Fixes + +Fixed the text overflow issue in custom stamps. + + +## 3.1 (10/16/2025) + +### UX Changes + +For Edit Viewer: + +* Added support for panning images in `textSelection` mode. +* Text markup annotations can be modified after being cropped. +* Return to `pan` mode if `textSelection` mode is turned off on mobile by clicking the icon. +* Added support for returning to `pan` mode by pressing ESC. + +For Edit Viewer and Browse Viewer: + +When the cursor is around the viewer's edges when selecting text or dragging the thumbnails, auto-scrolling will be triggered. It can be configured using the [`enableAutoScrollForTextSelection`](/api/interface/editviewerconfig.md#enableautoscrollfortextselection) property for Edit Viewer and the [`enableAutoScrollForDragPages`](/api/interface/browseviewerconfig.md#enableautoscrollfordragpages) property for Browse Viewer. + +### API Changes + +Added interfaces for better UI customizability. + +* [`getAnnotationDrawingStyle()`](/api/class/editviewer.md#getannotationdrawingstyle) method for Edit Viewer +* [`undoRedoStateChanged`](/api/class/editviewer.md#undoredostatechanged) event for Edit Viewer +* [`annotationDrawingStyleChanged`](/api/class/editviewer.md#annotationdrawingstylechanged) event for Edit Viewer +* [`scroll`](/api/class/editviewer.md#scroll) event for Edit Viewer and Browse Viewer +* [`paginationChanged`](/api/class/editviewer.md#paginationchanged) event for all the viewers +* [`cropMode`](/api/class/editviewer.md#cropmode) property for Edit Viewer. The [`crop()`](/api/class/editviewer.md#crop) method of Edit Viewer will choose which images to crop based on the `cropMode` if no image indices are passed. + +### Improvements + +* Increased the FPS of rendering documents, especially documents with lots of pages. +* Optimized the performance of `updateOptions()`. +* Moved the magnifier into a separate layer to improve the performance and avoid being blocked. + +### Bug Fixes + +* Fixed a bug where changes of the layout will reset the position of the current document page to its top-left. +* Fixed a bug where the text is shifted if the PDF's media box has shifts. + +## 3.0 (07/08/2025) + +### Features Highlights + +* Added support for text selection. We can now copy and annotate selected text. +* Added three text markup annotations: `highlight`, `strikeout` and `underline`. +* Added support for text search. + +### API Changes + +* Added classes for text markup annotations. + * [`Highlight`](/api/class/annotation/highlight.md) + * [`Underline`](/api/class/annotation/underline.md) + * [`Strikeout`](/api/class/annotation/strikeout.md) +* Added interfaces to set up text markup annotations. + * [`HighlightAnnotationOptions`](/api/interface/annotationinterface/highlightannotationoptions.md) + * [`UnderlineAnnotationOptions`](/api/interface/annotationinterface/underlineannotationoptions.md) + * [`StrikeoutAnnotationOptions`](/api/interface/annotationinterface/strikeoutannotationoptions.md) + * [`HighlightStyle`](/api/interface/annotationinterface/highlightstyle.md) + * [`UnderlineStyle`](/api/interface/annotationinterface/underlinestyle.md) + * [`StrikeoutStyle`](/api/interface/annotationinterface/strikeoutstyle.md) + * [`RectXY`](/api/interface/rectxy.md) +* Added new [tool mode](/api/class/editviewer.md#toolmode) for `EditViewer`: `textSelection`. +* Added new [annotation modes](/api/class/editviewer.md#annotationmode) for `EditViewer`: `highlight`, `strikeout` and `underline`. +* Added new buttons in [`ToolbarConfig`](/api/interface/annotationinterface/toolbarconfig.md): `copy`, `highlight`, `strikeout` and `underline`. +* Added new [elements](/ui/default_elements.md) for `EditViewer`: + * TextSelectionMode + * TextSearchPanelSwitch + * TextSearchPanel + * HighlightAnnotation + * UnderlineAnnotation + * StrikeoutAnnotation +* Added text selection and search methods and events for [`EditViewer`](/api/class/editviewer.md). +* Added an [`IDocTextSearcher`](/api/interface/idocument/idoctextsearcher.md) interface that can be created using [`createTextSearcher()`](/api/interface/idocument/index.md#createtextsearcher) of [`IDocument`](/api/interface/idocument/index.md). +* Added [`isPageModified()`](/api/interface/idocument/index.md#ispagemodified) method to detect whether a page has been modified. +* Added [`getVisiblePagesInfo()`](/api/class/editviewer.md#getvisiblepagesinfo) for viewers. +* Added new events for viewers. +* Updated [`IPageData`](/api/interface/ipagedata.md) to use Promise functions for computing-intensive operations. +* Updated [`updatePage()`](/api/interface/idocument/index.md#updatepage) to allow updating a page with PDF page content that has annotations. +* Updated [`addFonts()`](/api/namespace/ddv.md#static-addfonts) to return an array of the names of added fonts. +* Updated [`DisplayTextConfig`](/api/interface/displaytextconfig.md) for new elements. +* Removed the options parameter of [`getDefaultUiConfig()`](/api/namespace/ddv.md#static-getdefaultuiconfig). + +### Improvements + +* Fixed the ineffective quality parameter of [`saveToJpeg()`](/api/interface/idocument/index.md#savetojpeg) if a page is unmodified. +* Improved cursor styles. +* Improved the performance of resaving a large PDF file. + + +## 2.1 (12/03/2024) + +Version 2.1 of Dynamsoft Document Viewer comes with a suite of exciting new features, improvements to existing features, and performance optimizations. + +Dynamsoft Document Viewer now comes with **massively improved performance** for working with huge documents with a large number of high resolution images. Users can expect to load, edit, annotate, and export massive documents with ease. + + + +### New Features + +- Added `enableMagnifier`, which provides a corner magnifier in the [Edit Viewer]({{ site.api }}interface/editviewerconfig.html#enablemagnifier) and [Perspective Viewer]({{ site.api }}interface/perspectiveviewerconfig.html#enablemagnifier). This magnifier creates a zoomed-in view of the selected area to allow for more precise adjustments on touchscreen devices. + +- Added keyboard shortcuts for document management. These shortcuts are controlled by [`KeyboardInteractionConfig`]({{ site.api }}interface/keyboardinteractionconfig.html). All shortcuts are available for the Edit Viewer, and only the navigation and page selection shortcuts are available for the Browse Viewer: + - Undo/redo + - Copy/cut/paste + - Annotation/page selection + - Scrolling/navigation + - Cancel/delete + +- Added drag-and-drop image loading with the new `enableLoadSourceByDrag` configuration property for the [Edit]({{ site.api }}interface/editviewerconfig.html#enableloadsourcebydrag), [Browse]({{ site.api }}interface/browseviewerconfig.html#enableloadsourcebydrag), and [Perspective]({{ site.api }}interface/perspectiveviewerconfig.html#enableloadsourcebydrag) Viewers (enabled by default). + +- The new [`setAnnotationDrawingStyle`]({{ site.api }}class/editviewer.html#setannotationdrawingstyle) method can now be used when creating annotations to set its default drawing style, for example, to set a custom image to use as the default stamp annotation. + +- Added the following flags to restrict annotation editing actions: [`noResize`]({{ site.api }}interface/annotationinterface/flags.html#noresize), [`noRotate`]({{ site.api }}interface/annotationinterface/flags.html#norotate), [`noMove`]({{ site.api }}interface/annotationinterface/flags.html#nomove). These flags are preserved when saving to PDF, and respected when importing into DDV from PDF. + +- Added a [`flattened`]({{ site.api }}class/annotation/rectangle.html#flattened) property getter/setter to annotation objects, which flattens the **individual** annotation onto the base image layer. This behavior is also preserved upon saving to PDF. For example, a rectangle annotation may be flattened with [`Rectangle.flattened = true`]({{ site.api }}class/annotation/rectangle.html#flattened). + +- Added informative task progression messaging using [`InfoObject`]({{ site.api }}interface/infoobject.html) for event listening. `InfoObject` provides different details for different types. + +### Improvements + +- Improved general performance. + +- Added support for processing much larger documents (over 1000 pages). See performance improvements compared to version 2.0: + +{% comment %} +[Performance chart](/assets/imgs/version-2.1-release-performance-chart.png) + + +Win10 i5-7400 CPU @ 3.00GHz + +| Document Type | Number of Pages | File Size | Load Time | Peak Memory Use for Loading | Save Time | Peak Memory Use for Saving | +| --------------- | ------------------| ------------|------------|------------|------------|------------------------------------------------------------ | +|Image PDF[96DPI 2160x3840 convertMode ImageOnly]| 100| 92.1MB |1.3s |650MB|1.33s|780MB| +| |500 |460MB |4.5s|890MB|12.2s|1934MB| +| |1000|921MB|9.7s|960MB|24.07s|4GB +|Text PDF[A4 convertMode render] |100|2.61MB| 0.411s|330MB|0.290s| 340MB| +| |500|13.0MB|1.185s|446MB| 2.427s|556MB| +| |1000|26.1MB|2.777s|540MB|4.861s|590MB| +{% endcomment %} + Win10 i5-7400 CPU @ 3.00GHz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Document TypeNumber of PagesFile SizeLoad TimePeak Memory Use for LoadingSave TimePeak Memory Use for Saving
      Image PDF[96DPI 2160x3840 convertMode ImageOnly]10092.1MB1.3s650MB1.33s780MB
      500460MB4.5s890MB12.2s1934MB
      1000921MB9.7s960MB24.07s4GB
      Text PDF[A4 convertMode render]1002.61MB0.411s330MB0.290s340MB
      50013.0MB1.185s446MB2.427s556MB
      100026.1MB2.777s540MB4.861s590MB
      + +- The annotation toolbar and annotation palette in the Edit Viewer are now optional and can be toggled with [`toolbarConfig`]({{ site.api }}interface/annotationinterface/toolbarconfig.html) and [`paletteConfig`]({{ site.api }}interface/annotationinterface/paletteconfig.html) from [`annotationConfig`]({{ site.api }}interface/annotationconfig.html). + +- Removed page scrolling with mouse scroll wheel and touchscreen swiping in single page mode. + +- Improved page selection performance in the thumbnail gallery. + +## 2.0 (08/20/2024) + +**We are excited to introduce version 2.0, which focuses on adding a powerful new annotation feature. This release includes comprehensive support for various types of annotations, new APIs for managing annotations, and advanced UI capabilities for seamless interaction.** + +Supported Annotation Types: + +- [Rectangle]({{ site.api }}class/annotation/rectangle.html) +- [Ellipse]({{ site.api }}class/annotation/ellipse.html) +- [Polygon]({{ site.api }}class/annotation/polygon.html) +- [Polyline]({{ site.api }}class/annotation/polyline.html) +- [Line]({{ site.api }}class/annotation/line.html) +- [Ink]({{ site.api }}class/annotation/ink.html) +- [TextBox]({{ site.api }}class/annotation/textbox.html) +- [TextTypewriter]({{ site.api }}class/annotation/texttypewriter.html) +- [Stamp]({{ site.api }}class/annotation/stamp.html) + +### Built-in UI for Annotation + +#### Direct Annotation Operations in the UI + +- Add, select, and delete annotations +- Drag, resize, and rotate selected annotations +- Real-time editing of annotation styles using the palette + +#### New Built-in Elements + +- Added built-in elements to enhance UI configuration flexibility. + +### New APIs for Annotation + +- Added the namespace [Dynamsoft.DDV.annotationManager]({{ site.api }}class/annotationmanager.html) and APIs for annotation management: + + - Create, delete, and retrieve annotations based on various conditions + - Adjust annotation hierarchy + - Handle events triggered by annotation operations + +- Added the property [annotationConfig]({{ site.api }}interface/editviewerconstructoroptions.html#annotationConfig) to EditViewerConstructorOptions for configuring the annotations in the viewer, including the toolbar, palette, and default annotation style: + + - [annotationSelectionStyle]({{ site.api }}interface/annotationconfig.html#annotationSelectionStyle): Defines the style of annotation selection. + - [inkCreateDelay]({{ site.api }}interface/annotationconfig.html#inkCreateDelay): Specifies the delay for ink creation to support annotations created in multiple strokes. + - [showOnTopWhenSelected]({{ site.api }}interface/annotationconfig.html#showOnTopWhenSelected): Determines whether the selected annotation should be displayed on the top layer. + +- Added the method [` addFonts()`]({{ site.api }}namespace/ddv.html#static-addfonts) to add fonts to the library. + +- Added the method [`selectAnnotations()`]({{ site.api }}class/editviewer.html#selectannotations) to select the specified annotation(s) on the current page. + +- Added the method [`getSelectedAnnotations()`]({{ site.api }}class/editviewer.html#getselectedannotations) to retrieve selected annotation(s). + +- Add properties [`mediaBox`]({{ site.api }}interface/idocument/pagedata.html#mediaBox) and [`cropBox`]({{ site.api }}interface/idocument/pagedata.html#cropBox) to [`PageData`]({{ site.api }}interface/idocument/pagedata.html) for accurate annotation position calculation. + +- Added the property [`annotationMode`]({{ site.api }}class/editviewer.html#annotationmode) to specify or return the annotation mode of the viewer. + +- Add the property `saveAnnotation` to the interfaces [`SavePngSettings`]({{ site.api }}interface/idocument/savepngsettings.html), [`SaveJpegSettings`]({{ site.api }}interface/idocument/savejpegsettings.html), or [`SaveTiffSettings`]({{ site.api }}interface/idocument/savetiffsettings.html) to determine whether annotations are saved as part of the image when calling [`document.saveToPng()`]({{ site.api }}interface/idocument/index.html#saveToPng), [`document.saveToJpeg()`]({{ site.api }}interface/idocument/index.html#saveToJpeg), or [`document.saveToTiff()`]({{ site.api }}interface/idocument/index.html#saveToTiff). + +- Added the property [`saveAnnotation`]({{ site.api }}interface/idocument/savepdfsettings.html#saveAnnotation) to the interface [`SavePdfSettings`]({{ site.api }}interface/idocument/savepdfsettings.html) to configure whether annotations should be saved when [`document.saveToPdf()`]({{ site.api }}interface/idocument/index.html#saveToPdf) is called. + +- Add the parameter [`defaultUiConfigOptions`]({{ site.api }}interface/defaultuiconfigoptions.html) to [` getDefaultUiConfig()`]({{ site.api }}namespace/ddv.html#static-getdefaultuiconfig) to retrieve configurations including annotations. + +- Add the parameter [`printSettings`]({{ site.api }}interface/idocument/printsettings.html) to the [`document.print()`]({{ site.api }}interface/idocument/index.html#print) to specify whether printable annotations should be included in the print. + +- Added the type `annotation` to [`ToolMode`]({{ site.api }}class/editviewer.html#toolMode) to enable a mode that allows annotations to be manipulated via the UI. + +- Added the type `annotationSelectionStyle` to [`EditViewerStyleName`]({{ site.api }}class/editviewer.html#getStyle) for retrieving or updating the annotation selection style. + +### Other New APIs + +Additionally, we've optimized performance and added several new features to enhance the overall user experience. + +- Added the property [`password`]({{ site.api }}interface/idocument/savepdfsettings.html#password) to the interface [`SavePdfSettings`]({{ site.api }}interface/idocument/savepdfsettings.html) for configuring the password of the PDF file to save when [`document.saveToPdf()`]({{ site.api }}interface/idocument/index.html#saveToPdf) is called. + +- Added the property [`imageScaleFactor`]({{ site.api }}interface/idocument/savepdfsettings.html#imageScaleFactor) to the interface [`SavePdfSettings`]({{ site.api }}interface/idocument/savepdfsettings.html) for configuring the image scale factor of the PDF file to be saved when [`document.saveToPdf()`]({{ site.api }}interface/idocument/index.html#saveToPdf) is called. + +### Improved + +- Optimize the display effect of images in thumbnails. +- Optimize the interactive experience of scaling. +- Modified the type of [`PdfSource.renderOptions.renderAnnotations`]({{ site.api }}interface/idocument/pdfsource.html#renderAnnotations) to support reading annotations. +- The method `openDocument()` supports the UID or the document object. This affects the `openDocument()` method in the [`EditViewer`]({{ site.api }}class/editviewer.html#openDocument), [`PerspectiveViewer`]({{ site.api }}class/perspectiveviewer.html#openDocument), [`CaptureViewer`]({{ site.api }}class/captureviewer.html#openDocument), and [`BrowseViewer`]({{ site.api }}class/browseviewer.html#openDocument) classes. + +### Changed + +- Change the length unit from pixel to point for functions and events related to cropping, for example, [`crop()`]({{ site.api }}class/editviewer.html#crop), [`getCropRect()`]({{ site.api }}class/editviewer.html#getCropRect), [`setCropRect()`]({{ site.api }}class/editviewer.html#setCropRect), [`cropRectDrawn`]({{ site.api }}class/editviewer.html#cropRectDrawn), [`cropRectDeleted`]({{ site.api }}class/editviewer.html#cropRectDeleted),[`cropRectModified`]({{ site.api }}class/editviewer.html#cropRectModified). +- Change the units of the parameters pageWidth and pageHeight in the method [`insertBlankPage`]({{ site.api }}interface/idocument/index.html#insertblankpage) from inches to points. +- The related date string format change shifts from format D:YYYYMMDDHHmmSS to D:YYYYMMDDHHmmSSOHH'mm'. + +## 1.1 (01/12/2024) + +### Improved + +- Optimized compatibility with browsers. [>> Detail]({{ site.gettingstarted }}sys_requirement.html#supported-browsers) + +### Added + +- Added the namespace [`Dynamsoft.DDV.Core`]({{ site.api }}namespace/ddv_core.html). + +- Added the property [`license`]({{ site.api }}namespace/ddv_core.html#license) to specify the license string. + +- Added the property [`engineResourcePath`]({{ site.api }}namespace/ddv_core.html#engineresourcepath) to specify the path leading to a folder containing the distributed WASM files. + +- Added the property [`deviceFriendlyName`]({{ site.api }}namespace/ddv_core.html#devicefriendlyname) to specify a human-readable name for the device which corresponds to its UUID. + +- Added the method [`loadWasm()`]({{ site.api }}namespace/ddv_core.html#loadwasm) to load WASM modules before initializing. + +- Added the method [`init()`]({{ site.api }}namespace/ddv_core.html#init) to initialize DDV. + +- Added the method [`insertBlankPage()`]({{ site.api }}interface/idocument/index.html#insertblankpage) to insert a blank page to the document. + +### Removed + +The following API is removed. + +| API Name | Notes | +| ------------------------- | ------------------------------------------------------------ | +| `Dynamsoft.DDV.setConfig()` | Use [`Dynamsoft.DDV.Core.license`]({{ site.api }}namespace/ddv_core.html#license), [`Dynamsoft.DDV.Core.engineResource`]({{ site.api }}namespace/ddv_core.html#engineresourcepath), [`Dynamsoft.DDV.Core.deviceFriendlyName`]({{ site.api }}namespace/ddv_core.html#devicefriendlyname), [`Dynamsoft.DDV.Core.init()`]({{ site.api }}namespace/ddv_core.html#init) instead. | + +## 1.0.0 (12/26/2023) + +Dynamsoft Document Viewer (DDV) is a versatile SDK designed to offer a range of viewers for configuring and executing various document processing workflows. + +### Highlights + +#### Efficient Data Management + +Organize, retrieve, and manage documents and pages efficiently: +- Document Management: Document creation/deletion/merging, etc. +- Page management: Pages in documents loading/saving/deleting/moving, etc. + +#### Various Viewers + +Various kinds of viewers implement different document processing flows: +- Edit Viewer: Edit the pages in document, such as, rotating, cropping, filtering, etc. and adjust the layout of the display. +- Capture Viewer: Control camera, play video stream, and capture the images from camera. +- Perspective Viewer: Do page boundaries manual adjustment & perspective transformation. +- Browse Viewer: Display pages in multiple-mode, pages can be multiple selected. +- Custom Viewer: No built-in UI or functionality, which is used for creating your own viewer. + +#### Flexible Customization + +Besides using the default user interface and viewer directly, developers can easily and flexibly customize them: +- [User Interface](https://www.dynamsoft.com/document-viewer/docs/ui/index.html): Layout, elements +- [Viewer](https://www.dynamsoft.com/document-viewer/docs/viewer/index.html): Styles, viewer properties + +#### Advanced Features + +DDV provides methods to access document boundaries detection and image filter algorithms. +- [Image filter](https://www.dynamsoft.com/document-viewer/docs/features/advanced/imagefilter.html): Image filter algorithm which is used by Filter element in Edit Viewer. +- [Document detection](https://www.dynamsoft.com/document-viewer/docs/features/advanced/documentdetect.html): Document boundaries detection algorithm which is used during capturing images. Recommend using [Dynamsoft Document Normalizer](https://www.dynamsoft.com/document-normalizer/docs/web/programming/javascript/api-reference/document-normalizer-module.html?lang=javascript). diff --git a/_v4.0/upgrade-guide/index.md b/_v4.0/upgrade-guide/index.md new file mode 100644 index 0000000..0b73968 --- /dev/null +++ b/_v4.0/upgrade-guide/index.md @@ -0,0 +1,49 @@ +--- +layout: default-layout +needAutoGenerateSidebar: true +needGenerateH3Content: true +noTitleIndex: true +title: Upgrade Guide Dynamsoft Document Viewer Documentation +keywords: Documentation, Dynamsoft Document Viewer, Upgrade +breadcrumbText: Upgrade Guide +description: Upgrade guide for Dynamsoft Document Viewer +--- + +# Upgrade Guide + +Upgrading Dynamsoft Document Viewer from an old version to the latest version (v3.x as of now) is straightforward. You need to pay attention to the following changes: + +* Changes of APIs +* Changes of [`UIConfig`](/api/interface/uiconfig.md) + + +There are some code snippets that are frequently used and we will talk about the changes you have to make. + +## Initialization of Edit Viewer + +In v2.x, you can use an additional options parameter to enable the annotation icon in the default UI. + +```js +const editViewer = new Dynamsoft.DDV.EditViewer({ + container: "container", + uiConfig: Dynamsoft.DDV.getDefaultUiConfig("editViewer", {includeAnnotationSet: true}), +}); +``` + +In v3.x, the option is removed and the annotation icon is included in the default UI. So you can just initialize it with the following code: + +```js +const editViewer = new Dynamsoft.DDV.EditViewer({ + container: "container" +}); +``` + +## Default UI Config + +The default UI elements may be different across different versions. Check out [this post](/ui/default_ui.md) to learn about the default configs. + +You can try to unify the UI across versions by specifying the [`UIConfig`](/api/interface/uiconfig.md). But pay attention to supported [elements](/ui/default_elements.md) of different versions. + +## Getting the Page Data + +Before v3.x, [`getPageData()`](/api/interface/idocument/index.md#getpagedata) returns a promise object, which was time consuming as it required getting all the image blobs. In v3.x, it directly returns an [`IPageData`](/api/interface/ipagedata.md) object and you can retrieve image blobs with its functions. From 293b821c2b6bd54e5f9d3ca29a2f359de64cae5b Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Wed, 12 Aug 2026 17:23:01 +0800 Subject: [PATCH 49/51] 4.0 features side list --- _data/full_tree.yml | 2 ++ _includes/sidelist-features-v4.0.html | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 _includes/sidelist-features-v4.0.html diff --git a/_data/full_tree.yml b/_data/full_tree.yml index 2a11fc5..550531b 100644 --- a/_data/full_tree.yml +++ b/_data/full_tree.yml @@ -2,6 +2,7 @@ tree_file_list: - sidelist-introduction.html - sidelist-gettingstarted.html - sidelist-features.html + - sidelist-features-v4.0.html - sidelist-dviewer.html - sidelist-ui.html - sidelist-apis.html @@ -15,3 +16,4 @@ tree_file_list: - sidelist-apis-v3.2.1.html - sidelist-apis-v4.0.html + diff --git a/_includes/sidelist-features-v4.0.html b/_includes/sidelist-features-v4.0.html new file mode 100644 index 0000000..6dd7105 --- /dev/null +++ b/_includes/sidelist-features-v4.0.html @@ -0,0 +1,26 @@ +
    • Features + +
    • \ No newline at end of file From 444c2ffed5c07fdd1fccc0ec432f5eaea9180eb7 Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Wed, 12 Aug 2026 17:26:10 +0800 Subject: [PATCH 50/51] fix link to system requirements --- _includes/sidelist-gettingstarted.html | 2 +- _v1.1/index.md | 2 +- _v2.1/index.md | 2 +- _v2.1/releasenotes/index.md | 2 +- _v3.2.1/releasenotes/index.md | 2 +- _v4.0/index.md | 2 +- _v4.0/releasenotes/index.md | 2 +- gettingstarted/sys_requirements.md | 2 +- index.md | 2 +- releasenotes/index.md | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/_includes/sidelist-gettingstarted.html b/_includes/sidelist-gettingstarted.html index cf095c7..42c5e19 100644 --- a/_includes/sidelist-gettingstarted.html +++ b/_includes/sidelist-gettingstarted.html @@ -1,6 +1,6 @@
    • Getting Started
        -
      • System Requirements
      • +
      • System Requirements
      • Adding the dependency
      • SDK Initialization
      • Creating HelloWorld
      • diff --git a/_v1.1/index.md b/_v1.1/index.md index d2b9ffb..f4b19d4 100644 --- a/_v1.1/index.md +++ b/_v1.1/index.md @@ -10,7 +10,7 @@ description: Dynamsoft Document Viewer Documentation Homepage - [Introduction]({{site.introduction}}index.html) - Getting Started - - [System Requirements]({{ site.gettingstarted }}sys_requirement.html) + - [System Requirements]({{ site.gettingstarted }}sys_requirements.html) - [Adding the dependency]({{ site.gettingstarted }}add_dependency.html) - [SDK Initialization]({{ site.gettingstarted }}sdk_init.html) - [Creating HelloWorld]({{ site.gettingstarted }}helloworld.html) diff --git a/_v2.1/index.md b/_v2.1/index.md index 9cb1b7c..0e28362 100644 --- a/_v2.1/index.md +++ b/_v2.1/index.md @@ -10,7 +10,7 @@ description: Dynamsoft Document Viewer Documentation Homepage - [Introduction]({{site.introduction}}index.html) - Getting Started - - [System Requirements]({{ site.gettingstarted }}sys_requirement.html) + - [System Requirements]({{ site.gettingstarted }}sys_requirements.html) - [Adding the dependency]({{ site.gettingstarted }}add_dependency.html) - [SDK Initialization]({{ site.gettingstarted }}sdk_init.html) - [Creating HelloWorld]({{ site.gettingstarted }}helloworld.html) diff --git a/_v2.1/releasenotes/index.md b/_v2.1/releasenotes/index.md index 052b951..19e2cdd 100644 --- a/_v2.1/releasenotes/index.md +++ b/_v2.1/releasenotes/index.md @@ -223,7 +223,7 @@ Additionally, we've optimized performance and added several new features to enha ### Improved -- Optimized compatibility with browsers. [>> Detail]({{ site.gettingstarted }}sys_requirement.html#supported-browsers) +- Optimized compatibility with browsers. [>> Detail]({{ site.gettingstarted }}sys_requirements.html#supported-browsers) ### Added diff --git a/_v3.2.1/releasenotes/index.md b/_v3.2.1/releasenotes/index.md index d47e217..22f6867 100644 --- a/_v3.2.1/releasenotes/index.md +++ b/_v3.2.1/releasenotes/index.md @@ -331,7 +331,7 @@ Additionally, we've optimized performance and added several new features to enha ### Improved -- Optimized compatibility with browsers. [>> Detail]({{ site.gettingstarted }}sys_requirement.html#supported-browsers) +- Optimized compatibility with browsers. [>> Detail]({{ site.gettingstarted }}sys_requirements.html#supported-browsers) ### Added diff --git a/_v4.0/index.md b/_v4.0/index.md index 3013cf5..ee7075e 100644 --- a/_v4.0/index.md +++ b/_v4.0/index.md @@ -10,7 +10,7 @@ description: Dynamsoft Document Viewer Documentation Homepage - [Introduction]({{site.introduction}}index.html) - Getting Started - - [System Requirements]({{ site.gettingstarted }}sys_requirement.html) + - [System Requirements]({{ site.gettingstarted }}sys_requirements.html) - [Adding the dependency]({{ site.gettingstarted }}add_dependency.html) - [SDK Initialization]({{ site.gettingstarted }}sdk_init.html) - [Creating HelloWorld]({{ site.gettingstarted }}helloworld.html) diff --git a/_v4.0/releasenotes/index.md b/_v4.0/releasenotes/index.md index ff91c17..a23ab16 100644 --- a/_v4.0/releasenotes/index.md +++ b/_v4.0/releasenotes/index.md @@ -354,7 +354,7 @@ Additionally, we've optimized performance and added several new features to enha ### Improved -- Optimized compatibility with browsers. [>> Detail]({{ site.gettingstarted }}sys_requirement.html#supported-browsers) +- Optimized compatibility with browsers. [>> Detail]({{ site.gettingstarted }}sys_requirements.html#supported-browsers) ### Added diff --git a/gettingstarted/sys_requirements.md b/gettingstarted/sys_requirements.md index 5e50eee..ffe1fd4 100644 --- a/gettingstarted/sys_requirements.md +++ b/gettingstarted/sys_requirements.md @@ -7,7 +7,7 @@ title: Dynamsoft Document Viewer Getting Started - System Requirements keywords: Documentation, Dynamsoft Document Viewer, Getting Started, System Requirements breadcrumbText: System Requirements description: Dynamsoft Document Viewer Documentation Getting Started, System Requirements -permalink: /gettingstarted/sys_requirement.html +permalink: /gettingstarted/sys_requirements.html --- diff --git a/index.md b/index.md index 9a3c60f..9aa187d 100644 --- a/index.md +++ b/index.md @@ -10,7 +10,7 @@ description: Dynamsoft Document Viewer Documentation Homepage - [Introduction]({{site.introduction}}index.html) - Getting Started - - [System Requirements]({{ site.gettingstarted }}sys_requirement.html) + - [System Requirements]({{ site.gettingstarted }}sys_requirements.html) - [Adding the dependency]({{ site.gettingstarted }}add_dependency.html) - [SDK Initialization]({{ site.gettingstarted }}sdk_init.html) - [Creating HelloWorld]({{ site.gettingstarted }}helloworld.html) diff --git a/releasenotes/index.md b/releasenotes/index.md index e60ece4..46bf899 100644 --- a/releasenotes/index.md +++ b/releasenotes/index.md @@ -391,7 +391,7 @@ Additionally, we've optimized performance and added several new features to enha ### Improved -- Optimized compatibility with browsers. [>> Detail]({{ site.gettingstarted }}sys_requirement.html#supported-browsers) +- Optimized compatibility with browsers. [>> Detail]({{ site.gettingstarted }}sys_requirements.html#supported-browsers) ### Added From 630d6bd05137f4e2f5ada8eefba87e5e4394dcaf Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Wed, 12 Aug 2026 17:34:47 +0800 Subject: [PATCH 51/51] redirect sys_requirement.html --- web.config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web.config b/web.config index 617338d..a77dad4 100644 --- a/web.config +++ b/web.config @@ -30,6 +30,12 @@ + + + + + +