tags:

views:

42

answers:

1

Hi all,

Is it possible to print a doc file using cocoa application? If possible please give some suggestions. I printed pdf and image files.. But i didn't get any solution for doc files.

Thanks in advance, Ramesh.P

+1  A: 

The Word Document format is understood by NSAttributedString. It's displayed by NSTextView. The question you're really asking is "how do I print the contents of an attributed string," which reduces to "how do I print the contents of an NSTextView" at its simplest.

Even if you're not displaying the text view to the user, you'll still need an off-screen one with the desired settings to print it easily.

Joshua Nozzi
Thanks Joshua for your valuable reply. Now i am able to print doc file using attributed string and textview. But i am not able to print the xls files.
Ramesh
That is a separate issue - mark this question answered and post a new one with the details of what you tried and what you're seeing as a result.
Joshua Nozzi