我正在通过蓝牙
打印机打印下面的图像。
我指的是这个链接 link用于打印。 图片大小为 100 x 100 像素,图片模式为
public static byte[] SELECT_BIT_IMAGE_MODE = {0x1B, 0x2A, 33, (byte)255, 0};
但不知何故它显示为 image .我尝试了评论中给出的一些选项,但它不起作用。
有人可以帮我吗?在此先感谢
最佳答案
您可以为任何打印机使用 printooth 库,printooth 很简单且有据可查, https://github.com/mazenrashed/Printooth
var printables = ArrayList<Printable>()
var printable = Printable.PrintableBuilder()
.setImage(image)
.setNewLinesAfter(1) // To provide n lines after sentence
.build()
printables.add(printable)
BluetoothPrinter.printer().print(printables)
关于android - 在 Android 中的蓝牙打印机上打印图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42901756/