I've been using printing plugin to print documents. It is working fine as expected.
Is it possible to print files without showing the preview panel which actually comes from android print?
For example, when user clicks a button it should print the file automatically without any user interaction or intervention.
Is this feasible?
Thanks. Hussain
await Printing.directPrintPdf (
printer: Printer(url: 'name of your device(printer name)'
),
onLayout: (format) => _generatePdf(format, title));
Just call what the preview calls; for example:
await Printing.layoutPdf(
onLayout: (format) => _generatePrint()
name: 'tst.pdf',
format: PdfPageFormat.roll80,
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With