0

Folks we are developing Flutter windows desktop application it is the Point of sale application in this main feature is printing we can find lots of resources on ESC/pos topic in the android flutter application or even through method channel we can access the printer but in windows its quite challenging where and how to start so far we have used https://pub.dev/packages/printing this library which prints but the length of the print is limited to the size of the A4, so even I have tried to run ESC/pos command through cmd using dart but no luck can anyone help me out where to start ????

Thanks in advance !!

M.Yogeshwaran
  • 1,419
  • 4
  • 22
  • 48
  • paper size is only A4 that's you exact issue right? – Ruchit Oct 16 '21 at 10:55
  • That's probably because the printer is set up as a Windows Desktop page printer. Try setting the printer to serial port connection mode and installing the serial port driver instead of the Windows printer driver. And if you modify flutter's escpos printer library to handle printing from the serial port of your local PC, you'll be able to print. – kunif Oct 16 '21 at 12:15
  • The thing is am using tm-m30 Epson model which doesn't have serial port connection – M.Yogeshwaran Oct 16 '21 at 12:51
  • No @ruchit I need to connect any pos printer with flutter web app – M.Yogeshwaran Oct 16 '21 at 12:52
  • The serial port is USB vendor class mode. You should be able to install and use the serial port device driver using that mode. Alternatively, if you are connected via Bluetooth or LAN, you may be able to use flutter's escpos printer library without modification. – kunif Oct 16 '21 at 13:03
  • Am using usb connection – M.Yogeshwaran Oct 16 '21 at 13:06
  • Hello Yogeshwaran, Did you manage to solve this? Please could you explain? i am facing the same problem. Thanks – Kisoth Srinathan Jan 19 '23 at 17:26

1 Answers1

0

The printing plugin has support for 80mm and 57mm prints. The most common width size used for thermal paper receipts is 80mm. You can then set the page using PdfPageFormat

Page(
  pageFormat: PdfPageFormat.roll80,
  build: (Context context) => SizedBox(
    child: // Receipt contents
  ),
),
Omatt
  • 8,564
  • 2
  • 42
  • 144