admin管理员组

文章数量:1335170

I am developing a mobile web application. On the form when the user press Print button I need to print the page on a 4 inch printer.
My question is how can I connect to the printer from the mobile web browser(may be using bluetooth, USB).
My application will be running on all type of smart phones(Andriod , IOS, Windows, BB etc).

I am developing a mobile web application. On the form when the user press Print button I need to print the page on a 4 inch printer.
My question is how can I connect to the printer from the mobile web browser(may be using bluetooth, USB).
My application will be running on all type of smart phones(Andriod , IOS, Windows, BB etc).

Share Improve this question edited Oct 10, 2021 at 17:59 Dharman 33.4k27 gold badges101 silver badges147 bronze badges asked Sep 23, 2013 at 5:31 Abhijit CAbhijit C 3133 silver badges20 bronze badges 4
  • how about an HTML-formatted email sent to a printer that has an email address to talk with? – frequent Commented Sep 23, 2013 at 7:46
  • sounds good...but pls can you elaborate it... – Abhijit C Commented Sep 23, 2013 at 9:27
  • 'Too Broad' by a mile and unclosable due to bounty. – bmargulies Commented Jan 2, 2014 at 1:58
  • 1 each platform will have native api you could implement your functionality using those. For android- developer.android./about/versions/android-4.4.html#Printing – Jayan Commented Jan 2, 2014 at 10:14
Add a ment  | 

6 Answers 6

Reset to default 5 +50

Unfortunately android and ios lack the concept of a printer driver so there is no native and widely supported way to print from mobile devices.

However there are a couple of other options to consider:

  1. Rely on the user to have an app installed for their preferred printer (this probably is not a satisfactory solution as these apps often integrate poorly with mobile web browsers)
  2. Target the (fairly mon) printers which support email printing, that is allow the users to enter the email address for their printer and then send an email to that address containing whatever it is that you wish to print (for anything other than plaintext you will need to send a multipart email with html content)

The easiest thing to do is use a service like Google Cloud Print.

Once the user has pleted the action on the app (iPhone, Android, BB) or web browser, you can then submit the data to a printer of your choice. There is full documentation available.

Unfortunately not all the printers are supported by Android. But if you have a back-end, get a wifi printer and print it using the wifi-printing preferences from the back-end, trigger of course is from the mobile.

This seems like a better fit:

Use a print server - a separate puter that accepts simple printing messages from your app. The print server can house the drivers for the printer and take care of rendering. You can write a small service application to listen for jobs from the app.

Android wasn't designed to talk to printers.

try iprintmarvel printer it is very easy to integrate with android/java mobiles

Use javascript to print the page from browser, but your phone must be connected to a printer. Just try this line of code on any button click event.

window.print();

本文标签: javascriptPrint Web page on 4 inch printer from mobileStack Overflow