IOS AirPrint功能

IOS AirPrint功能实现必要条件:
设备
A、移动设备
iPad(所有型号)
iPhone(3GS 或者 之后的版本)
iPod touch(第3代或者之后的版本)
B、打印设备
一台支持AirPrint的打印机,并且该打印机应与IOS移动设备设有相同的WiFi网络。
支持AirPrint的打印机型号如下:
HYPERLINK "javascript:void(0);"Brother
Brother DCP-J525N
Brother DCP-J525W
Brother DCP-J725DW
Brother DCP-J725N
Brother DCP-J925DW
Brother DCP-J925N
Brother MFC-J280W
Brother MFC-J425W
Brother MFC-J430W
Brother MFC-J432W
Brother MFC-J435W
Brother MFC-J5910DW
Brother MFC-J625DW
Brother MFC-J825DW
Brother MFC-J825N
Brother MFC-J835DW
Brother MFC-J955DN
Brother MFC-J955DWN
HYPERLINK "javascript:void(0);"Canon
Canon MG5310
Canon MG5320
Canon MG5330
Canon MG5340
Canon MG5350
Canon MG5370
Canon MG5380
Canon MG6210
Canon MG6220
Canon MG6230
Canon MG6240
Canon MG6250
Canon MG6270
Canon MG6280
Canon MG8220
Canon MG8230
Canon MG8240
Canon MG8250
Canon MG8270
Canon MG8280
HYPERLINK "javascript:void(0);"EPSON
EPSON Artisan 730
EPSON Artisan 837
EPSON EP-804A
EPSON EP-804AR
EPSON EP-804AW
EPSON EP-904A
EPSON EP-904F
EPSON ME Office 940FW
EPSON PX-1600F
EPSON PX-1700F
EPSON PX-B700
EPSON PX-B750F
EPSON Stylus NX430
EPSON Stylus NX530
EPSON Stylus NX635
EPSON Stylus Office BX535WD
EPSON Stylus Office BX630FW
EPSON Stylus Office BX635FWD
EPSON Stylus Office BX935FWD
EPSON Stylus Photo PX730WD
EPSON Stylus Photo PX830FWD
EPSON Stylus SX440W
EPSON Stylus SX445W
EPSON Stylus SX535WD
EPSON Stylus TX435W
EPSON Stylus Photo TX730WD
EPSON WorkForce 545
EPSON WorkForce 645
EPSON WorkForce 845
EPSON WP-4011
EPSON WP-4015
EPSON WP-4020
EPSON WP-4025
EPSON WP-4511
EPSON WP-4515
EPSON WP-4521
EPSON WP-4525
EPSON WP-4530
EPSON WP-4531
EPSON WP-4535
EPSON WP-4540
EPSON WP-4545
HYPERLINK "javascript:void(0);"Hewlett Packard
HP Deskjet 3050A J611
HP Deskjet 3070A
HP Envy 100 e-All-In-One D410
HP Envy 110 e-All-In-One D411a
HP LaserJet P1102w Printer
HP LaserJet P1606dn Printer
HP LaserJet Pro 100 color MFP M175nw
HP LaserJet Pro CM1415fn Color MFP
HP LaserJet Pro CM1415fnw Color MFP
HP LaserJet Pro CP1025nw Color Printer
HP LaserJet Pro CP1525nw Color Printer
HP LaserJet Pro M1212nf MFP
HP LaserJet Pro M1213nf MFP
HP LaserJet Pro M1214nf MFP
HP LaserJet Pro M1216nf MFP
HP LaserJet Pro M1217nfw MFP
HP LaserJet Pro M1536dnf MFP
HP Officejet 6500A e-All-In-One E710a
HP Officejet 6500A Plus e-All-In-One E710n
HP Officejet 7500A Wide Format e-All-In-One E910a
HP Officejet Pro 8500A e-All-In-One A910a
HP Officejet Pro 8500A Plus e-All-In-One A910g
HP Officejet Pro 8500A Premium e-All-In-One A910g
HP Officejet Pro 8600A e-All-in-One Printer N911a
HP Officejet Pro 8600A Plus e-All-in-One N911g
HP Officejet Pro 8600A Premium e-All-in-One N911g
HP Photosmart 5510 e-AiO B111a
HP Photosmart 5514 e-AiO B111h
HP Photosmart 6510 e-AiO B211a
HP Photosmart 7510 e-AiO C311a
HP Photosmart e-All-in-One D110a
HP Photosmart eStation C510
HP Photosmart Plus e-All-In-One B210a
HP Photosmart Premium e-All-In-One C310
HP Photosmart Premium Fax e-All-In-One C410a
HP Photosmart Wireless e-All-In-One B110—Europe and Asia-Pacific
HP TopShot LaserJet Pro M275
HYPERLINK "javascript:void(0);"Lexmark
Lexmark C792
Lexmark C925
Lexmark C950
Lexmark OfficeEdge Pro4000
Lexmark OfficeEdge Pro4000c
Lexmark OfficeEdge Pro5500
Lexmark OfficeEdge Pro5500t
Lexmark Pro715
Lexmark Pro915
Lexmark X548
Lexmark X792
Lexmark X925
Lexmark X950
Lexmark X952
Lexmark X954

注:其他打印机如果需要使用AirPrint功能可以安装AirPrint破解程序,具体步骤可参考一下资料:

http://hi.baidu.com/engling/blog/item/785d874411fafd5c510ffee6.html

或者

http://mobile.it168.com/a2010/1126/1131/000001131071_all.shtml


编写代码。
在IOS程序中主要使用的是UIPrintInteractionController类实现AirPrint的功能。UIPrintInteractionController类提供给打印内容四个互斥的属性:
printingItem:            一个单独的打印对象,设置实例对象可以是NSURL,NSData,UIImage,ALAsset
printingItems:        一组打印对象,实例对象同上
printFormatter:        某种布局的格式
printPageRenderer:    自定义打印页面渲染

showsPageRange属性表示是否显示页面范围。如果showsPageRange设置为YES,同时页面大于1,并且设置的属性是printingItems之外的任一属性,则打印选项包含选择页面范围选项。

请参看我的资源中的demo。


参考资料:

http://hi.baidu.com/engling/blog/item/785d874411fafd5c510ffee6.html

http://mobile.it168.com/a2010/1126/1131/000001131071_all.shtml

http://support.apple.com/kb/ht4356

http://hi.baidu.com/amigoradio/blog/item/92249d4378c3280b9313c60d.html

http://jingyan.baidu.com/article/1612d500156ac1e20e1eeed6.html

http://www.cocoachina.com/iphonedev/sdk/2011/0513/2851.html

http://www.yifeiyang.net/iphone-web-development-skills-of-the-article-4-make-sure-the-network-environment-3gwifi/

https://developer.apple.com/library/ios/#documentation/2DDrawing/Conceptual/DrawingPrintingiOS/Printing/Printing.html

http://stackoverflow.com/questions/992348/reading-html-content-from-a-uiwebview

http://www.cocoabuilder.com/archive/cocoa/296745-playing-with-ios-uiprintinteractioncontroller-to-generate-pdf-output.html

http://stackoverflow.com/questions/5817840/print-paper-size-and-content-inset

http://stackoverflow.com/questions/1005521/iphone-nsdata-nsurl-with-cookie

http://www.iphonedevsdk.com/forum/iphone-sdk-development/5608-uiwebview-how-get-content-shown.html

你可能感兴趣的:(JavaScript,ios,c,Office,HP,Hyperlink)