Python 热敏票据打印机工具包

billPrinter.zip 提供了使用 Python 控制热敏打印机进行票据打印的便捷工具。

主要功能

  • printHelper.py: ESC 指令封装类,提供基础打印控制功能。
  • billHelper.py: 票据打印封装类,简化票据排版和打印过程。
  • printBill.py: 票据打印测试用例,展示如何使用工具包打印票据。
  • printBarCode.py: 条形码打印示例,演示如何打印条形码。

使用方法

  1. 连接打印机并安装驱动程序。
  2. printBill.py 中,将 printerName 变量修改为打印机名称。
  3. 根据需求修改 printBill.py 中的票据内容和格式。
  4. 运行 printBill.py 进行票据打印测试。

注意事项

打印机名称可以在“设备和打印机”控制面板中找到。

zip
billPrinter.zip 预估大小:11个文件
folder
billPrinter 文件夹
file
__init__.pyc 135B
file
printFile.py 205B
file
billHelper.pyc 2KB
file
printBarCode.py 212B
folder
__init__.py 文件夹
file
说明.txt 592B
file
printHelper.py 3KB
file
printBill.py 649B
file
printHelper.pyc 4KB
folder
template 文件夹
folder
data 文件夹
folder
exe 文件夹
file
RawPrint.exe 28KB
file
billHelper.py 3KB
zip 文件大小:20.38KB