Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically print document from printer over local Wi-Fi or Bluetooth network

I have to give print option in my app for printing PDF files. Here I am listing requirement for my app:

  1. Internet will not be available for printing.

  2. It should print PDF document on A4 size paper.

  3. Proper navigation need to be done. Means if PDF printed successfully than message need to be show. If Printer not available than message need to be show.

    I have done R&D for this and found following option:

1) Google Cloud Print - Google Cloud Print is a Google service that was created to allow any Cloud-Print-aware application on any device in the network cloud to print to any printer

Dependency: - Internet Connection is required

Pros - Easy to setup - Work with variety of printers

2) Epson Printer SDK Epson SDKs are designed to shorten the development time required to implement mobile POS applications for wireless POS printing from handheld peripherals.

Dependency and Restrictions - Work only with Epson POS(Point of Sale) printer - Peripheral device must support supports ARMv5TE - If the device goes into sleep mode while communicating with a printer via Bluetooth, the connection will be lost.

3) Zebra Printer SDK The Zebra Multiplatform SDK contains all the required components to develop applications for Zebra label printers.

Dependency - Work only with Zebra Printers. Namely, •Mobile: MZ™ series, QL Plus™ series, RW™ series, P4T™/RP4T™ printers
•Desktop: G-Series™, HC100™, TLP/LP 2824 Plus™ printers •High-performance/Mid-range: Xi4™ and XiIIIPlus™, PAX4™ series, ZM400™/ZM600™, S4M™, 105SL™ printers •RFID: RXi™ series, R110PAX4™, RZ400™/RZ600™ printers •Kiosk: KR403™ printer

  • Supported Android Devices (using Android v2.1 or higher) •HTC® Desire™ •HTC Evo™ •HTC Nexus One™ •LG™ Ally™ •Motorola ET1 •Motorola® Droid™ •Motorola XT701 •Samsung® Captivate •Samsung P1000 Galaxy Tab

4) Using STAR Printer SDK - StarIO SDK is a high level programming tool that simplifies the development and creation of software for Star printers.

Dependency - Work only with POS Star Printers

5) Send Intent to Other Apps - We can send Intent to other for printing files.

Dependency - Depend on third party app - If person having HP printer than ePrint app need to be installed and if person having Brother printer than iPrint app need to be installed etc..

By looking at the options available I can't used:

  • Google Cloud Print because internet is not available for app

  • EpSON SDK because it support only POS printers but I have to print PDF on A4 size paper. Also it's SDK only supports ARMv5TE Architecture devices.

  • Star and Zebra SDK because they also support only POS printers
  • Intent because proper navigation is not avialable. Means cant get printer current state, PSF print success or failure.

Please let me know what are the other options available to us for printing directly from device as printing PDF is crucial part of my application. Last year Google release Printing API but it supports from 4.4 and above.

like image 896
Sagar Trehan Avatar asked May 06 '14 06:05

Sagar Trehan


People also ask

Do printers connect by Wi-Fi or Bluetooth?

Wireless printers come in two basic types: Bluetooth and Wi-Fi. Bluetooth is simple to set up and use but is more appropriate for small office spaces and a limited number of users. While Wi-Fi takes more time to set up, it can serve more users over a greater range.

Can you print to a printer via Bluetooth?

But now, you can print from your smartphone or tablet via Wi-Fi and even Bluetooth. On this page: Setting up your printer. Connecting a printer to an Android device.

Is Bluetooth printing the same as Wi-Fi printing?

Wireless printers use a wireless network connection, usually transmitted by a router, to send data from a device to the printer. Unlike a Bluetooth printer, WiFi printers require data to work. These printers can function with any data connection, whether it be a modem, router, or hotspot connection.

Can you print to a printer on a different WiFi network?

Many new printers are network printers that can connect to your network via Wi-Fi. Once connected, you install the appropriate driver software on each computer and all the computers can print to that printer over the network.


1 Answers

I already worked with STAR Printer SDK and it works great. But printers are dedicated for mobile POS.

We also make test with Samsung printers, it need a specific app from Samsung but you could print document as PDF on A4 printer.

http://www.samsung.com/us/mobile-print-app/ https://play.google.com/store/apps/details?id=com.sec.print.mobileprint

like image 97
LaurentY Avatar answered Oct 06 '22 01:10

LaurentY