更新记录
1.0.0(2023-12-02)
初始版本: 支持蓝牙TSC指令打印图片和PDF
平台兼容性
uni-app
| Vue2 |
Vue3 |
Chrome |
Safari |
app-vue |
app-nvue |
Android |
iOS |
鸿蒙 |
| √ |
√ |
- |
- |
- |
- |
5.0 |
× |
× |
| 微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
小红书小程序 |
快应用-华为 |
快应用-联盟 |
| × |
× |
× |
× |
× |
× |
- |
× |
× |
- |
× |
× |
uni-app x
| Chrome |
Safari |
Android |
iOS |
鸿蒙 |
微信小程序 |
| - |
- |
5.0 |
× |
× |
× |
其他
| 多语言 |
暗黑模式 |
宽屏模式 |
蒸汽模式 |
| × |
× |
× |
√ |
om-gprinter
打印图片
let options : PrintOptions = {
content: UTSAndroid.getResourcePath("/static/test.png"),
paperWidth: 70,
paperHeight: 58,
gap: 2,
commandType: 'tsc'
}
OMGPrinter.printImage("DC:1D:30:70:3D:07", options, result => {
console.log(result)
})
打印PDF
let options : PrintOptions = {
content: UTSAndroid.getResourcePath("/static/test.pdf"),
paperWidth: 70,
paperHeight: 58,
gap: 0,
commandType: 'tsc'
}
OMGPrinter.printPdf("DC:1D:30:70:3D:07", options, result => {
console.log(result)
})