1

I´m making a simple webapp, I want that when it is open in mobile phones print some data using the user´s wifi printer which most of cases will be an Epson L355.

Can anybody give me a clue or sample to achieve this?

Thank you all.

Alan Alvarez
  • 646
  • 2
  • 11
  • 32
  • 1
    What about browser's printing functionality? `window.print();` – Tuğca Eker Jul 28 '16 at 14:44
  • It will depend on the OS of the mobile phone. Android doesn't support window.print alas. There's a workaround for android in this topic http://stackoverflow.com/questions/26684190/using-window-print-or-alternative-on-android-devices and a few other ones. For iOS and such, window.print should work. Do keep in mind the user will still have to select the correct printer and such, we can't edit the print settings with javascript only. – Shilly Jul 28 '16 at 14:53

1 Answers1

0

You won't be able to do this because you don't have access to the user's printer. Instead, you can just generate a pdf and redirect user on it.

The user will then be able to download / print the pdf via his inline PDF viewer.

You can do it by following this : How to force files to open in browser instead of download (pdf)?

Community
  • 1
  • 1