未知
afthermal的Python项目详细描述
注意
afthermal当前处于alpha状态。这是 发展部门。当它被有效地使用时,一些特性 可能未完成或未记录。
afthermal是流行的Adafruit(最初是cashino)的驱动程序/库 热敏打印机[1]。
部分原因是受到了之前的努力的启发:
- https://github.com/adafruit/Adafruit-Thermal-Printer-Library
- https://github.com/adafruit/Python-Thermal-Printer/
- https://github.com/luopio/py-thermal-printer/
afthermal试着比以前更像Python,更有效率, 大部分是其他语言的1:1端口。 此外,它不注重教育,而是作为一个 处理此类硬件的可靠库。
功能包括:
- 轻松处理文本格式
- 从PIL/Pillow以及OpenCV打印图像的适配器
- 一个快速的Floyd-Steinberg实现来抖动OpenCV图像。
- 用于校准打印机以获得最佳速度和 质量,以及其他功能
- 支持通过PyQRCode打印二维码而无需呈现它们 先进入图像
[1] | Specification is available at http://www.adafruit.com/datasheets/CSN-A2%20User%20Manual.pdf |
安装
afthermal可从pip安装。它支持一个名为 tools,安装它将包括用于校准 打印机、打印测试图像或其他任务:
$ pip install 'afthermal[tools]'
它包含一个用于Floyd-Steinberg抖动的c扩展,因为OpenCV可以 不带抖动功能。因此,C模块必须 可在安装afthermal时编译。