dp-eh600热敏打印机(adafruit)的驱动程序。

thermalprinter的Python项目详细描述


https://travis-ci.org/BoboTiG/thermalprinter.svg?branch=master

管理dp-eh600热敏打印机的python模块(由adafruit销售)。

安装

简单到:

python3 -m pip install --upgrade --user thermalprinter

用法

一个例子胜过千言万语:

fromPILimportImagefromThermalPrinterimport*withThermalPrinter(port='/dev/ttyAMA0')asprinter:# Pictureprinter.image(Image.open('gnu.png'))# Bar codesprinter.barcode_height(80)printer.barcode_position(BarCodePosition.BELOW)printer.barcode_width(3)printer.barcode('012345678901',BarCode.EAN13)# Stylesprinter.out('Bold',bold=True)printer.out('Double height',double_height=True)printer.out('Double width',double_width=True)printer.out('Inverse',inverse=True)printer.out('Rotate 90°',rotate=True,codepage=CodePage.ISO_8859_1)printer.out('Strike',strike=True)printer.out('Underline',underline=1)printer.out('Upside down',upside_down=True)# Chinese (almost all alphabets exist)printer.out('现代汉语通用字表',chinese=True,chinese_format=Chinese.UTF_8)# Greek (excepted the ΐ character)printer.out('Στην υγειά μας!',codepage=CodePage.CP737)# Accentsprinter.out('Voilà !',justify='C',strike=True,underline=2,codepage=CodePage.ISO_8859_1)# Line feedsprinter.feed(2)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何使用从PreparedStatement返回的RowId。getGeneratedKeys()?   selenium chrome驱动程序中下一个网站url的java空白页   java如何将参数化匿名类转换为lambda?   java JUnit在AfterClass上获取测试结果   java将动态XML/JSON内容与静态标记化负载进行比较,并检索标记值   java共享一个需要数据持久性的项目[数据库]   java在调用方法时获取意外的参数类型。getParameterTypes()   java如何用jdbc在swing中用另一个字段替换外键?   需要java Jersey Tomcat CDI依赖项解释   java如何生成UML图   java如何编写Jersey rest服务可以通过给定的spring代码访问   SpringMaven存储库管理器Nexus与Java依赖项的Artifactory   java将包从另一个项目导入eclipse中的当前项目   加密Java使用密码加密文件