my dog learned polymorphism*
The moose likes Other JSE/JEE APIs and the fly likes Print MS Office documents using unix commands Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Print MS Office documents using unix commands" Watch "Print MS Office documents using unix commands" New topic
Author

Print MS Office documents using unix commands

Latha Sree
Greenhorn

Joined: Apr 07, 2009
Posts: 17
Hello Friends,

Can anyone please help me how to print MS Office documents using unix commands.
With lp and lpr commands, it is giving the following error
lp: unable to print file: client-error-document-format-not-supported

Please suggest me how to print doc files in unix
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41040
    
  43
I don't think there are *any* printers that support direct printing of MS Office documents. Using OpenOffice in server mode through its Java API is one way of doing this.

You seem to have lots of different questions about printing of documents - maybe if you told us what the overall problem is you're trying to address we can point to solutions that address it in full, instead of piecemeal for each question.


Ping & DNS - my free Android networking tools app
Latha Sree
Greenhorn

Joined: Apr 07, 2009
Posts: 17
Ulf Dittmer wrote:I don't think there are *any* printers that support direct printing of MS Office documents. Using OpenOffice in server mode through its Java API is one way of doing this.

You seem to have lots of different questions about printing of documents - maybe if you told us what the overall problem is you're trying to address we can point to solutions that address it in full, instead of piecemeal for each question.



Hello,

Sorry for late reply..
I found that best solution to print files is by using unix command,lp..It is very simple to do..
But..it too has some limitations.
it doesnt support some formats.
Now..I want MS Office documents to be printed..By any way..
i.e. unix or java program or convert docs to PDF and then print.
Please suggest any way to achieve it.

Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41040
    
  43
Ulf Dittmer wrote:Using OpenOffice in server mode through its Java API is one way of doing this.
Latha Sree
Greenhorn

Joined: Apr 07, 2009
Posts: 17
Ulf Dittmer wrote:
Ulf Dittmer wrote:Using OpenOffice in server mode through its Java API is one way of doing this.


Hiii

Thanks for your response..
Could you please help me out with some sample examples.

Thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Print MS Office documents using unix commands
 
Similar Threads
How to print multiple documents at a time
Print MS Office Documents using Java API
Setting printer paper length using unix commands
Connecting to Remote Unix Host from JAVA
Excel document created using HSSF POI API not opening in Windows7 but opening in Win XP