GithubHelp home page GithubHelp logo

guoxinglin / scanner-addon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from malongmedea/scanner-addon

0.0 0.0 0.0 31 KB

这是一个node.js addon项目,通过twain协议调用扫描仪

License: MIT License

JavaScript 0.21% C++ 13.14% Python 0.37% C 86.28%

scanner-addon's Introduction

scanner-addon

这是一个node.js addon项目,通过twain协议调用扫描仪

开发记录

64位程序不能加载32位dll文件

  1. 重新安装node.js 32位版本。node.js 64位版本可以编译,但不能运行测试

  2. 重新安装electron 32位版本

    npm install --arch=ia32 electron --save-dev
    或者
    yarn add --arch=ia32 electron -D
  3. node-addon 插件重新编译32位版本

    node-gyp rebuild --target=4.0.0 --arch=ia32 --dist-url=https://atom.io/download/electron

    其中--target指的是electron版本号。--arch指的是平台,在这里设置为ia32(即32位)。--dist-url指编译头文件下载地址。

  4. 参考资料: https://blog.csdn.net/cnhk1225/article/details/53884710

运行测试

  1. 查阅 .vscode/launch.json 文件运行测试
  2. test.js中的Uint8Array构造函数参数应为一个窗口句柄值【这是重点中的重点】
  3. 提示:必须连接扫描仪或者安装了虚拟扫描仪,否则无法运行。

踩坑参考:

  1. 《vsCode开发node.js addon 踩坑记》

scanner-addon's People

Contributors

malongmedea avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.