I have a requirement at work to create a pos service to print receipt to a thermal printer using javascript. The target printer is epson Tm-m30.
I generated html page with receipt details and tried printing using window.print() but
- we don't want print preview dialog to show up.
- The printer will be connected over network and connected with IP address. I could not add the printer in printing options in android device as somehow epson print enabler is not able to detect the printer.
Next I tried epson epos SDK for javascript. I was able to print from all devices but the sdk have limited customization. We can't add styles like we add in html page for print.I was not able to figure out how to add custom font in SDK. Also if I add image in print then content after image prints from next line. I tried adding text in image but then extra text does not wrap in new line and get cut. So epos SDK seems too much work but still less customization.
I want to directly print html page to a network printer using printer's IP address from android device without showing print preview dialog.