Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion _data/product_version.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
useGroupedVersion: true

version_info_list:
- value: 1.3.1 MDS (latest version)
- value: 1.4.0 MDS (latest version)
- value: 1.3.1 MDS
- value: 3.1 MWC (MDS 1.1)
- value: 3.0 MWC (MDS 1.0)
- value: 2.0 MWC
Expand Down
2 changes: 2 additions & 0 deletions _includes/sidelist-api-v1.3.1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<li><a href="{{ site.api }}index-v1.3.1.html" class="otherLinkColour">API Reference</a>
</li>
10 changes: 10 additions & 0 deletions _includes/sidelist-code-gallery-v1.3.1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<li><a class="otherLinkColour">Code Gallery</a>
<ul>
<li><a href="{{ site.code-gallery }}mobile-web-capture/index-v1.3.1.html" class="otherLinkColour">Full Document Management</a>
<ul>
<li><a href="{{ site.code-gallery }}mobile-web-capture/customization-guide-v1.3.1.html" class="otherLinkColour">Customization Guide</a></li>
<li><a href="{{ site.code-gallery }}mobile-web-capture/api-v1.3.1.html" class="otherLinkColour">API Reference</a></li>
</ul>
</li>
</ul>
</li>
5 changes: 5 additions & 0 deletions _includes/sidelist-full-tree-v1.3.1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-introduction-v1.3.1.html" -%}
{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-guide-v1.3.1.html" -%}
{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-code-gallery-v1.3.1.html" -%}
{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-api-v1.3.1.html" -%}
{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-release-notes.html" -%}
7 changes: 7 additions & 0 deletions _includes/sidelist-guide-v1.3.1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<li><a href="{{ site.guide }}index-v1.3.1.html" class="otherLinkColour">Developer Guide</a>
<ul>
<li><a href="{{ site.guide }}angular-v1.3.1.html" class="otherLinkColour">Angular Guide</a></li>
<li><a href="{{ site.guide }}react-v1.3.1.html" class="otherLinkColour">React Guide</a></li>
<li><a href="{{ site.guide }}vue-v1.3.1.html" class="otherLinkColour">Vue Guide</a></li>
</ul>
</li>
1 change: 1 addition & 0 deletions _includes/sidelist-introduction-v1.3.1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<li><a href="{{ site.introduction }}index-v1.3.1.html" class="otherLinkColour">Introduction</a></li>
444 changes: 444 additions & 0 deletions api/index-v1.3.1.md

Large diffs are not rendered by default.

634 changes: 548 additions & 86 deletions api/index.md

Large diffs are not rendered by default.

122 changes: 122 additions & 0 deletions guide/angular-v1.3.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
---
layout: default-layout
needAutoGenerateSidebar: true
needGenerateH3Content: true
noTitleIndex: false
breadcrumbText: Angular Guide
title: Mobile Document Scanner JS Edition - Angular
keywords: Documentation, Mobile Document Scanner, Web, JS Edition, Dynamsoft Document Scanner, Angular
description: Mobile Document Scanner JS Edition Angular User Guide
---

# Mobile Document Scanner - Angular

> [!IMPORTANT]
> This article builds on the prerequisite [MDS developer guide]({{ site.guide }}index.html) for plain JavaScript; please read it before proceeding.

Mobile Document Scanner integrates easily with Angular applications. Just as in plain JavaScript, you can add document scanning in your **Angular application** in just a few lines of code, and achieve most customizations through the same accessible configuration object.

## Features

- Easy integration with pre-built UI
- Render MDS inside an Angular component
- **Standalone components** (modern Angular architecture)
- Capture and process documents from video stream
- Automatic document detection and cropping
- Mobile-optimized scanning interface
- TypeScript support with type definitions

## Requirements

- **Node.js 20.19.0 or later**
- [Base requirements]({{ site.introduction }}index.html#system-requirements)

## License

### Get a Trial License

Try **MDS** by requesting a trial license through our [customer portal](https://www.dynamsoft.com/customer/license/trialLicense?product=mwc&utm_source=github_angular_readme). You can renew the license twice for up to a total of two months of free access.

### Get a Full License

[Contact us](https://www.dynamsoft.com/company/contact?product=mwc&utm_source=github_angular_readme) to purchase a full license.

## Quick Start

We publish **MDS** library files on [npm](https://www.npmjs.com/package/dynamsoft-document-scanner) to make them simple to reference from a CDN. We reference the library files in our _ready-made_ Hello World sample for Angular included in our GitHub source repository:

1. Download **MDS** from [GitHub](https://github.com/Dynamsoft/document-scanner-javascript) as a compressed folder.

2. Extract the contents of the archive, and open the extracted directory in a code editor.

3. Set your [license key](#get-a-trial-license) in the **Angular framework sample**:
1. Open the sample at [`/samples/frameworks/angular/src/app/app.component.ts`](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/document-scanner-javascript-dev/samples/frameworks/angular/src/app/app.component.ts).
2. Search for `"YOUR_LICENSE_KEY_HERE"`, then replace it with your actual license key.

### Install Dependencies

```bash
npm install
```

### Start the App

```bash
ng serve
```

> [!TIP]
> If you installed Angular locally, you can call the local version with
> ```shell
> npx ng serve
> ```

Open `http://localhost:4200/` to view the sample app.

> [!NOTE]
> Secure context requires HTTPS to provide camera access, but Angular CLI serves over HTTP by default. For mobile testing, you may need to configure HTTPS or use a reverse proxy.

## Self-Host Resources

You can self host the resources for the Hello World by following a few simple steps. Refer to the [plain JavaScript self-hosting guide]({{ site.guide }}index.html#quick-start) for details.

### Set File Paths

First we set MDS to look resource paths where we will place the resources later:

```typescript
const documentScanner = new Dynamsoft.DocumentScanner({
license: "YOUR_LICENSE_KEY_HERE",
scannerViewConfig: {
cameraEnhancerUIPath: "dist/libs/dynamsoft-document-scanner/dist/document-scanner.ui.html",
},
engineResourcePaths: {
rootDirectory: "dist/libs/"
},
});
```

### Move Resources

Now, add a script (`get-libs`) to automatically move the resources to their destination when building the project (`build`) in `samples/framework/angular/package.json`:

```json
"scripts": {
"ng": "ng",
"start": "ng serve --ssl",
"build": "ng build && npm run get-libs",
"get-libs": "npm install --no-save dynamsoft-capture-vision-data dynamsoft-capture-vision-bundle && npx mkdirp /dist/libs && npx cpx 'node_modules/dynamsoft-*/**/*' dist/libs/ --dereference",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
```

When building, **swap the build script** from `ng build` to `npm run build`. Continue using `ng serve` to serve the application.

## Customization

Please check the official [documentation]({{ site.guide }}index.html).

## Support

If you have any questions, feel free to contact [Dynamsoft support](https://www.dynamsoft.com/company/contact?product=mwc&utm_source=github_angular_readme).
Loading