Giter Site home page Giter Site logo

escpos-win's Introduction

node-escpos 插件

escpos-win

win构建重要 注意使用 vs2015

npm install --global --production windows-build-tools --vs2015

windos

- usb免驱动
- 自动获取第一个usb打印机

安装测试

npm install escpos-win
npm test
yarn add escpos-win
yarn test

Win()

const escpos = require('escpos');
escpos.Win = require('escpos-win');

const device = new escpos.Win(); // 默认USB
const device = new escpos.Win('COM1');
const device = new escpos.Win('LPT1');

const options = { encoding: "GB18030" /* default */ }
// encoding is optional
const printer = new escpos.Printer(device, options);

escpos-win's People

Contributors

bigrocs avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

sdtm1016

escpos-win's Issues

执行报这个错

$ node download.js
D:\demo\project\print\node_modules\bindings\bindings.js:121
throw e;
^

Error: \?\D:\demo\project\print\node_modules\node-escpos-win\build\Release\addo
n.node is not a valid Win32 application.
\?\D:\demo\project\print\node_modules\node-escpos-win\build\Release\addon.node
?[90m at Object.Module._extensions..node (internal/modules/cjs/loader.js:1307
:18)?[39m
?[90m at Module.load (internal/modules/cjs/loader.js:1105:32)?[39m
?[90m at Function.Module._load (internal/modules/cjs/loader.js:967:14)?[39m
?[90m at Module.require (internal/modules/cjs/loader.js:1145:19)?[39m
?[90m at require (internal/modules/cjs/helpers.js:75:18)?[39m
at bindings (D:\demo\project\print\node_modules?[4mbindings?[24m\bindings.j
s:112:48)
at win32Escpos (D:\demo\project\print\node_modules?[4mnode-escpos-win?[24m
index.js:3:40)
at Object. (D:\demo\project\print\node_modules?[4mnode-escpos-wi
n?[24m\index.js:35:18)
?[90m at Module._compile (internal/modules/cjs/loader.js:1256:30)?[39m
?[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1277:1
0)?[39m

这个错误是win32的问题吗

Printer does not print

The operation is successful. The callback function displays success, but the printer does not respond. What is the problem

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.