开发者

printing a doc file using cocoa

开发者 https://www.devze.com 2023-01-28 08:01 出处:网络
I\'m looking fo开发者_Python百科r a simple code to print the contents of a MS Word file (.doc, .docx) using Cocoa. I\'m a newbie to Cocoa. Someone please help.Mac OS? Doc format is supported by NSAttr

I'm looking fo开发者_Python百科r a simple code to print the contents of a MS Word file (.doc, .docx) using Cocoa. I'm a newbie to Cocoa. Someone please help.


Mac OS? Doc format is supported by NSAttributedString, which means it can be opened in an NSTextView. You print a doc file the same as you print most other text/rich text files. You can do it with an off-screen text view if you don't want to force the user to view it before printing.

There is some good example code for printing from an off-screen NSTextView on the CocoaDev wiki.

0

精彩评论

暂无评论...
验证码 换一张
取 消