I am working in new flutter project that capture a widget to PNG image with a barcode and a few text like this one and send the data to the printer via native code. But I had many issues. For example printing is too slow with ios devices (android print speed is ok). So I decide to print from PDF for ios and I have a few questions:
thank you
You can check out this package:
https://pub.dev/packages/printing
examples from the package:
final doc = pw.Document();
doc.addPage(pw.Page(
pageFormat: PdfPageFormat.a4,
build: (pw.Context context) {
return pw.Center(
child: pw.Text('Hello World'),
); // Center
}));
then
await Printing.layoutPdf(
onLayout: (PdfPageFormat format) async => doc.save());
hope it works for you.