Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Cross-platform Desktop Document Scanner App

This sample demonstrates how to create a desktop document scanning app using Electron and the Dynamic Web TWAIN SDK for Windows, Linux and macOS.

A Basic Electron Application

Refer to https://github.com/electron/electron-quick-start for guidance on setting up a basic Electron application, which requires just these files:

  • package.json - Points to the app's main file and lists its details and dependencies.
  • main.js - Starts the app and creates a browser window to render HTML, serving as the app's main process.
  • index.html - The web page that is rendered, acting as the app's renderer process.

Usage

  1. Request a trial license and update the license key in index.html:

    Dynamsoft.DWT.ProductKey = 'LICENSE-KEY';
  2. Install the dependencies:

    npm install -g electron
    
    cd app
    npm install
  3. Run the app:

    electron .
    # Or 
    # npx electron .

    electron document scanner

Packaging the App for Distribution

  1. Install asar.

    npm install -g asar
  2. Package the app:

    asar pack app app.asar
  3. Download Electron prebuilt package and copy the app.asar file to the resources folder.

  4. Run the app by executing the Electron binary.

Blog

Cross-platform Document Scan Application with Electron