SurfAndScan is a Framework that allow you to use scan and print devices from the browser. It offers some more features.
Like following workflow (Download Document from your cloud system / Edit local with your associated editor / Upload edited file via event polling or automatic to cloud system)
A minimalist web framework for vue or every other javascript project. The Framework handles the API from the surfAndScan client driver.
Simplest way to test SurfAndScan is to download and install the SurfAndScan driver and open the swagger documentation here. Try swagger documentation.
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.
####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.
No problem, install the surfAndScan client and open this demo-site
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
- 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
- Website and Documentation - [website repo]
- GitHub Organization for Official Middleware & Modules
- Google Group for discussion
The quickest way to get started with SurfAndScan is to open the website FrameworkTest
.
Install the executable. SurfAndScanInstaller.exe
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, ..
The original author of ScanAndSurf is mebel MatthiasEbel