Comments (2)
@nletech 谢谢你的关注,由于安卓和ios的sdk差异较大,暂不考虑增加太复杂的方法;
对于复杂的布局及图形,建议使用打印图片的方式,思路如下:
1、在打印预览界面进行复杂布局
2、使用[screenshot] 组件生成截图
3、使用打印托盘方式
示例参考
File image = await screenshotController.capture(pixelRatio: 5);
List<int> imageBytes = await image.readAsBytes();
String base64Image = base64Encode(imageBytes);
List<LineText> list = List();
list.add(LineText(type: LineText.TYPE_IMAGE, content: base64Image,
align: LineText.ALIGN_CENTER, linefeed: 1));
await bluetoothPrint.print(list);
from bluetooth_print.
作者你好,如果打印整个widget的截图,打印机反应会非常慢。目前打印70*110尺寸的标签,打印一张需要30秒才能打印出来。
根据我们目前的测试,即使是打印全空白的widget,只要尺寸是70*110,就一定需要30秒才能打印出来。
所以想问一下,是机器的问题还是代码的问题,是否有能更快打印的打印机?
打印机型号:佳博3120TU
代码如下
list1.add(LineText(
type: LineText.TYPE_IMAGE,
x: 8,
y: 6,
width: 530,
content: base64Image,
));
from bluetooth_print.
Related Issues (20)
- cannot print in ios cyryllic text like "Привет, мир!"
- how to change charset of printing text in ios in native code?
- 如何更改ios中打印文本的字符集? 我需要“cp866”而不是“GB18030”
- [Android] App crash when call function startScan after update version 4.3.0
- False updates on status stream
- Esc print ios HOT 1
- Android 34 Namespace not specified HOT 1
- Can not print in IOS
- In IOS package is not working HOT 1
- Features: Please remove the line spacing
- Connect success then disconnect immediately HOT 10
- App craches, the package bluetooth_print can't print images on ios, it's working in android but doesn't work in iOS HOT 6
- Application is getting crashed when connecting to the printer using bluetooth_print 4.3.0 Dependency in IOS but Working fine in android HOT 1
- Connected device address. HOT 2
- Arabic Support
- slow printing in tsc label printer HOT 1
- Cannot print using printer with TSPL command
- no print in android HOT 1
- Arabic Text support
- when will the new version come out? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bluetooth_print.