简体   繁体   中英

How to access any printer present in wifi network in an iPhone application?

I want to develop an iPhone application where i want to access any printer present in my wifi network.

But according to Apple :" Printing is not supported because there is no direct support for connecting printers or other print-related hardware to an iPhone or iPod touch".

But there are many application in appstore which is providing this facility.

So Is it possible to access any printer present in my wifi network and print any PDF/Any file.

If yes then how?

Is there any API available for this?

There is no current API for this.

What those applications do is implement the raw functionality - ie. the HP app for printing to HP printers opens a raw socket connection to the printer and converts the document to be printed into the raw format for the printer. So it may be converting the PDF document into PCL for example. There is no iphone API for PCL, so you would have to read the PCL specification and learn how to generate it "by hand", or find a library from another platform you can port onto the iphone.

The problem is, there are a large number of printers, some speak PCL, some speak postscript, some speak custom languages - it is a large task to implement them all.

Some of the apps in the appstore rely on you having a PC, and they install a piece of software on the PC - effectively all these are is a frontend to send the document to the PC to be printed, using the printer drivers already present on the PC.

Apple have stated that they will be releasing printing for the ipad - ipad printer support confirmed by Steve Jobs . Presumably that will involve an API other apps can use, and it seems likely that will eventually come to the iphone too.

Here's one of the apps you mention:

http://mobile.eurosmartz.com/faqs/faqs_index.html

You can print direct to most WiFi printers or installing by the WePrint helper software on your Mac or PC you can print to any printer connected to your computer via USB cable, network, WiFi, BlueTooth or other means.

So the PC will have a custom bit of software which will print documents to an attached printer, and the iPhone must communicate with said PC software and transmit the required document.

Hope that helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM