如何在热敏打印机上打印热敏字母?安卓

问题描述 投票:0回答:1

我无法在热敏打印机上打印热敏字母。

我现在使用 DantSu ESC/POS ANDROID 库,但我无法在其中提供 utf-8 字符集,也许以前有人使用过它。请帮我解决这个问题或分享一个更好的库

库的 GitHub 链接 - https://github.com/DantSu/ESCPOS-ThermalPrinter-Android

bluetooth thermal-printer
1个回答
0
投票

您可以尝试的解决方案之一是 tpmake 要打印的文本的 pdf,以 Base 64 进行转换,以 png 或 bmp 进行转换,然后使用库进行打印。

要使用库打印图像,您可以使用此标签

[C]<img>" + PrinterTextParserImg.bitmapToHexadecimalString(printer, myBitmap, DisplayMetrics.DENSITY_MEDIUM))+"</img>\n
© www.soinside.com 2019 - 2024. All rights reserved.