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

Recommended Answers

All 2 Replies

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.