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).
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:
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)
Target the (fairly common) 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 completed 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 computer 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();
Related
I'm able to print HTML5 Canvas content. But every time when I click print a window prompts to select printer and settings.
How to make silent printing? I need the browser to print in default printer without prompt.
I need the solution for IE 10 and later, Edge and Chrome.
From a web application you cannot access resources on local machine like file system or installed applications. If you need this capability in your web application, you need to develop some browser plugin which can do this job.
This won't work as granting the web page access to printing without a prompt would be a security problem.
There may however be an option (flag) for disabeling the printing dialog in your browser. But this would affect all websites viewed in this browser.
I'm aware that I cannot do this with Html/JS. Can I do this with communicating to a installed program in OS from web page. There has to be a way.
It would be better if there is already some sort of solution
I have a web app where users can create invoices. I would like users to able to print tags/labels that the web app generates directly from their phones.
I will only be supporting the latest phones. A Chrome Mobile & Android only solution is perfectly acceptable.
I've looked into Google Cloud Printing but, and please correct me if I'm wrong, the gmail account must be the same for the user and the printer in order to print. I would need ~5 users to be able to print from the same printer.
What are the best practicing regarding mobile printing from web apps?
I'm writing an application to show the uploaded documents using python3-django-1.8.1. We also want to allow user to scan a document.
As you know that, there is a print dialog in javascript.
window.print()
Is there any support in the browser to scan a document?
Is it possible to launch a scanner application on clients machine, using javascript/python?
like:
"Windows Fax and Scan" on Windows machines
"Simple Scan" on linux, etc. OR
Whatever the default scanner application on respective os of the client.
Any third party python application/js plugin allow to scan a document?
I am not too familiar with a image scanning feature, but I had faced a similar issue with a barcode scanner.
You cannot actually expect something similar to printing, as printing is a browser-enabled feature whereas scanning is something a typical browser does not do.
Moreover, JS has no capability of accessing peripherals directly. What would happen if this page would be browsed by a mobile? (A scan from the camera would be fantastic but never heard of anything like it).
Having said that, there is a scanner.js SDK:
scanner.js enables any web page to acquire images from scanners using JavaScript in most desktop browsers like IE, Chrome, Firefox and more. In most cases, software install is not required and the user can enjoy a great scanning experience.
Also there is a Twain SDK:
Dynamic Web TWAIN is a TWAIN-based scanning SDK software specifically designed for web applications.
These are supposingly dealing with your issue but I haven't used them. Scanner.js demo is not even working now on my Ubuntu machine. My guess is that they are not entirely JS-based anyway (com objects and stuff).
Other things to do is to have a small Firefox plugin developed if your case is specific (such as Intranet) so to control the users' browsers.
Last, but not least, another option would be to develop and provide a small desktop app to handle scanning and uploading.
If there is any other recommendation I would love to see it.
I have to add Print button to my site. I used tyical window.print() solution.
But this method doesn't work in chrome and atomic browser on ios7 but works in safari.
How should I implement this feature?
Check this out: http://www.printfriendly.com/browser_tool
You can integrate their javascript to your web page so that your users can either print directly or print as a pdf. IMHO the window.print() is useless on an iPad or iPhone unless you have a wireless printer nearby. Most of the cases you wont have one nearby. The option above is promising because i can save it to iBooks or Adobe Reader and later print or send it as an email - That's usable.