Git Product home page Git Product logo

escpos-printer's Introduction

escpos 指令打印机驱动

仅仅自己研究测试使用,精简而不全;因为自己也是遇到问题才更新!


😀 TSPL指令集的打印机请跳转https://github.com/lilindog/TSPL-Printer


💡 最近我看到有博客引用该库,我接下来准备重构一下:

  1. 改善代码结构(分层),增加escpos指令的打印状态获取; 最近在研究tsc打印指令;等我缓过来就来完成这些工作。
  2. 图片转bitmap算法自己实现(目前正在做),去除之前的node环境的相关依赖,更方便于移植到如小程序、混合app的蓝牙打印场景。
    为了实现上面第2个需求,最近花了很多时间去掌握lz77、huffman、crc以及png、jpg等图片的二进制结构。

介绍

适用于nodejs的小票打印机驱动。
已在mac端、pc端、树莓派端(nodejs、nwjs) 下跑通。

应用场景

nwjs/electron 驱动小票打印机打印菜单小票。
nodejs 驱动打印机打印菜单小票。

使用

直接看examples中的示例代码。
或者看源码。

注意

目前只针对佳博(佳博官网)80mm系列印机和广州优库打印模组(模组官网简介)使用usb连接方式做了测试,确保能正常使用。 其它牌子的打印机没有做实测,不过理论上来说只要打印机支持escpos指令即可兼容,也有可能各家打印机在指令兼容上面各有微调。
网络打印目前没有搞, 哪有鸡巴时间来搞。

测试效果

escpos-printer's People

Contributors

code4freeman 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.