surfandscan

1.2.1 • Public • Published

SurfAndScan

Overview and Client

Edologic Logo

SurfAndScan is a Framework that allow you to use scan devices from the browser. A minimalist web framework for node, vue and every other javascript project. The Framework handles the API from the surfAndScan Client.

Install SurfAndScanClient (For Windows or MacOS)

On Windows you need to install the windows setup. Extract the zip and double click the installer file.

On MacOs you need to install the dmg setup. Not available yet. Try again later.

NPM Version NPM Downloads Linux Build Mac Build Windows Build

####At first import the framework

import sas from 'surfandscan'

####How to check SurfAndScan is installed on host The request starts with

var onSuccess = function(data) {
  console.log('sas is installed');
};
var onError = function(xhr, status, error) {
  console.log('sas is not running or not installed. Please download');
};
sas.checkIsAvailable(onSuccess, onError)


####How to get the available scan devices
The request starts with
```js
var onSuccess = function(data) {
  console.log(data);
};
var onError = function(xhr, status, error) {
  console.error(xhr, status, error);
};
sas.getDevices(onSuccess, onError)

The response in onSuccess

[
  {
    "id": "d_ICA_Dell C2665dnf Color MFP",
    "name": "Dell C2665dnf Color MFP",
    "type": "ICA"
  }
]]

####How to start the scan process The request starts with

var onSuccess = function(data) {
  console.log(data);
};
var onError = function(xhr, status, error) {
  console.error(xhr, status, error);
};
var parameter = {
  duplex:false,
  feederUnit: 0,
  deviceAddress: 'd_ICA_Dell C2665dnf Color MFP'
}
sas.scan(onSuccess, onError, parameter)

The response in onSuccess with actual scan status informations

{
  "id": "task3441595979362720.992698398762",
  "status": "starting",
  "files": [],
  "pageNo": 0,
  "progress": 0,
  "success": true,
  "message": "",
  "feederUnit": 0,
  "messageCode": 0
}

####How to get scan process status information The request starts with

var onSuccess = function(data) {
  console.log(data);
};
var onError = function(xhr, status, error) {
  console.error(xhr, status, error);
};
var taskId = "task3441595979362720.992698398762"
sas.getTaskStatus(taskId, onSuccess, onError, parameter)

The response in onSuccess with actual scan status information 'status' is set to 'done' when done. You get a list of file ids.

{
  "id": "task3441595979362720.992698398762",
  "status": "done",
  "files": [
    {
      "id": "file584650585869633184.6413714743682",
      "name": "img_0.jpg"
    },
    {
      "id": "file58465239210551744.710738804383254",
      "name": "img_1.jpg"
    },
    {
      "id": "file584654120563940876.8503452494729",
      "name": "img_2.jpg"
    }
  ],
  "pageNo": 3,
  "progress": 0,
  "success": true,
  "message": "Feeder is empty",
  "feederUnit": 0,
  "messageCode": 0
}

####How to download a scan task

var taskId = "task3441595979362720.992698398762";
var filePattern = ""; // empty or an fileName 
var pageOrder = null; // or an array with reordered ids like ["file584654120563940876.8503452494729", "file58465239210551744.710738804383254", "file584650585869633184.6413714743682"]
sas.downloadTaskAsPDF(taskId, filePattern, pageOrder)

####How to delete one page from scan task Simply user the pageOrder parameter and dismiss on id.

I want to test without programming

No problem, install the surfAndScan client and open this demo-site

Installation

This is a javascript module available through the npm registry.

Installation is done using the npm install command:

$ npm install surfandscan

Follow our installing guide for more information or use the demo-site

Features

  • Cross-Browser Support: Chrome, Edge, Firefox and IE
  • Focus on high performance
  • Easy implementation
  • Integrate To Pages Within An Hour
  • Fast Flatbed And ADF Scanning
  • Generates Thumbnails & Upload To Web Servers Directly
  • Multiple output formats: PDF, TIFF, JPEG

Docs & Community

Quick Start

The quickest way to get started with SurfAndScan is to open the website FrameworkTest.

Install the executable. SurfAndScanInstaller.exe

Philosophy

The SurfAndScan philosophy is to provide small, robust tooling for HTTPS servers, making it a great solution for single page applications, web sites, hybrids, or public HTTP APIs. It allows you to enable every https site to connect with an scan device. Twain, ICA, WIA, ..

People

The original author of ScanAndSurf is mebel MatthiasEbel

License

MIT

Package Sidebar

Install

npm i surfandscan

Weekly Downloads

4

Version

1.2.1

License

MIT

Unpacked Size

207 kB

Total Files

19

Last publish

Collaborators

  • edologic