Skip to content

Commit 2891c3a

Browse files
update to Document-Viewer-Javascript 2.0
1 parent 562c15f commit 2891c3a

11 files changed

Lines changed: 1446 additions & 448 deletions

File tree

README.md

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,53 @@
33
![version](https://img.shields.io/npm/v/dynamsoft-document-viewer.svg)
44
![downloads](https://img.shields.io/npm/dm/dynamsoft-document-viewersvg)
55
![jsdelivr](https://img.shields.io/jsdelivr/npm/hm/dynamsoft-document-viewer.svg)
6-
![](https://img.shields.io/snyk/vulnerabilities/npm/dynamsoft-document-viewer.svg)
76

8-
[Dynamsoft Document Viewer (DDV)](https://www.dynamsoft.com/document-viewer/docs/introduction/index.html) is a versatile SDK designed to offer a range of viewers for configuring and executing various document processing workflows.
7+
[Dynamsoft Document Viewer (DDV)](https://www.dynamsoft.com/document-viewer/docs/introduction/index.html) 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.
98

10-
Key features include:
9+
#### Security
10+
Dynamsoft Document Viewer is independently developed and does not rely on any external third-party open-source software. All processing, such as rendering and editing, is securely performed within the browser using a web assembly module. This architecture eliminates the need for a server-side backend, ensuring security compliance and scalability.
1111

12-
- Data Management: Organize, retrieve, and manage documents and pages efficiently.
12+
#### Browser and Platform Compatibility
13+
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.
1314

14-
- Viewer Types: Customize your document interaction with a variety of viewers.
15+
#### Supported File Types
16+
Users can open, edit, and save PDFs, as well as various image formats such as JPEG, PNG, BMP, TIFF, and GIF.
1517

16-
Additionally, DDV enhances functionality by allowing integration with customized image filtering processes and document boundary detection processes. It is particularly recommended to use [Dynamsoft Document Normalizer](https://www.dynamsoft.com/document-normalizer/docs/web/programming/javascript/) for document detection.
18+
#### Annotation Types
19+
Dynamsoft Document Viewer supports a variety of annotation types to enhance document interaction and collaboration. Users can add, edit, and delete annotations such as:
1720

18-
DDV enables the seamless creation of a document management web application tailored to your specific workflow, user interface, and style needs.
21+
- text
22+
- images
23+
- signature
24+
- shapes
25+
- stamps
26+
- freehand drawings
27+
28+
#### Data Management Concepts
29+
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.
30+
31+
Page: The smallest unit of data management, currently represented as an image. Each page has a unique pageUid.
32+
Document: A collection of pages, each with a unique docUid. Documents collectively make up the entire data set.
33+
Managing data, therefore, involves managing documents and pages.
34+
35+
If you are using the default UI of DDV, data processing and management are handled internally.
36+
37+
#### UI Customization
38+
The SDK offers extensive customization options, enabling developers to tailor the interface, toolbar, and annotation tools to meet specific application needs and branding requirements.
39+
40+
#### Designed with Camera Capture in Mind
41+
Dynamsoft Document Viewer is designed for seamless integration with camera capture. It features five built-in viewer types, with the first three optimized for camera capture scenarios:
42+
- Edit Viewer: Provides image quality enhancement filters.
43+
44+
- Capture Viewer: Includes built-in camera control for continuous capture.
45+
46+
- Perspective Viewer: Equipped with document cropping features; for document detection, using Dynamsoft Document Normalizer is recommended.
47+
48+
- Browse Viewer
49+
50+
- Custom Viewer
51+
52+
As part of the Mobile Web Capture solution, this viewer helps developers create efficient, accurate, and user-friendly workflows, from camera capture to document finalization.
1953

2054
## Table of Contents
2155

@@ -50,7 +84,7 @@ Apart from the browsers, the operating systems may impose some limitations of th
5084

5185
## License Key
5286

53-
[![](https://img.shields.io/badge/Get-30--day%20FREE%20Trial%20License-blue)](https://www.dynamsoft.com/customer/license/trialLicense/?product=ddv&utm_source=npm)
87+
[![](https://img.shields.io/badge/Get-30--day%20FREE%20Trial%20License-blue)](https://www.dynamsoft.com/customer/license/trialLicense/?product=mwc&utm_source=npm)
5488

5589
## Adding the dependency
5690

@@ -70,8 +104,8 @@ Review the complete code:
70104
<meta http-equiv="X-UA-Compatible" content="IE=edge">
71105
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
72106
<title>DDV - HelloWorld</title>
73-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dynamsoft-document-viewer@1.1.0/dist/ddv.css">
74-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-document-viewer@1.1.0/dist/ddv.js"></script>
107+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dynamsoft-document-viewer@2.0.0/dist/ddv.css">
108+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-document-viewer@2.0.0/dist/ddv.js"></script>
75109
</head>
76110
<style>
77111
html,body {
@@ -94,9 +128,9 @@ Review the complete code:
94128
<script type="module">
95129
(async () => {
96130
// Public trial license which is valid for 24 hours
97-
// You can request a 30-day trial key from https://www.dynamsoft.com/customer/license/trialLicense/?product=ddv
131+
// You can request a 30-day trial key from https://www.dynamsoft.com/customer/license/trialLicense/?product=mwc
98132
Dynamsoft.DDV.Core.license = "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9";
99-
Dynamsoft.DDV.Core.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-document-viewer@1.1.0/dist/engine";
133+
Dynamsoft.DDV.Core.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-document-viewer@2.0.0/dist/engine";
100134
await Dynamsoft.DDV.Core.init();
101135
Dynamsoft.DDV.setProcessingHandler("imageFilter", new Dynamsoft.DDV.ImageFilter());
102136
const editViewer = new Dynamsoft.DDV.EditViewer({
@@ -118,10 +152,11 @@ Generally, the features of DDV can be divided to two parts as below.
118152

119153
### Data Management
120154

121-
Data management is to manage the data which is imported into DDV. It is managed from the following two aspects:
155+
Data management is to manage the data which is imported into DDV. It is managed from the following three aspects:
122156

123157
- Document Management: Document creation/deletion/merging, etc.
124158
- Page management: Pages in documents loading/saving/deleting/moving, etc.
159+
- Annotation management: Adding/deleting/selecting/dragging/resizing/rotating annotations, etc.
125160

126161
### Viewers
127162

dist/ddv.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ddv.es.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ddv.js

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/engine/ddv-imagecore.wasm

122 KB
Binary file not shown.

dist/engine/ddv-imageio.wasm

17.1 KB
Binary file not shown.

dist/engine/ddv-imageio.worker.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/engine/ddv-pdfreader.wasm

657 KB
Binary file not shown.

0 commit comments

Comments
 (0)