Native Shopify Mobile App with 20 new features
Kickstart your hyperlocal marketplace in Corona pandemic with a starter guide
Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 184.108.40.206 release ready!
Owner and Founder. Opencart
In this blog we will learn on how to print content from your application by connecting with your wifi printer.
Android community provides some APIs that helps us in printing content from our application.They have classified the printing into three categories :
You can find more details regarding these categories over here : https://developer.android.com/training/printing/index.html
Here, we will discuss about how to print the html content as i needed to print only that.
You can try the other two yourself.
Implementing this is not at all difficault if you follow the steps in the same manner.
Now lets have a look at the code to have a clear idea of how to print the html content.
This is the main piece of code . Now lets have a look at the function createWebPrintJob(view)
And finally lets have a look at the function getHtmlContent() :
You can change the content of the getHtmlContent as per your need.
And it is done.
But keep in mind that your Printer and mobile should be on the same wifi network.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
If due to any reason this is not working please share a snippet of what exactly are you trying and I will try to help you.
Great Product, Great Team, and Great Support Service. And if you want to add more features to the product, they can submit any idea that comes to your mind. They really care about their clients and we are really happy and honored to deal with Webkul.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.