954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Print different format files using java API

Hi All,

I need to print documents ( MS-DOC, PDF, Plain Text ) using Java API. I do not need window for configuring number of pages to be print etc etc.. Whatever the file specified should be printed.
I checked with

printerJob.print();


from java API and able to print simple text. I need to approach same for files of different formats.
Any other API's ? How do i approach?
Any help will be appreciated.

Thanks,
Praveen

praveenrajmat
Newbie Poster
3 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 
__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

If you can render the file into a Java window, then you can also print it. see http://java.sun.com/docs/books/tutorial/2d/printing/
So this come down to asking "what file types can you display on Java?" PDFs can be displayed using Adobe's own free Java pdfviewer. For MS word docs you'll need to search for the code - I'm sure it exists.

JamesCherrill
Posting Genius
Moderator
6,371 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You