Home arrow static arrow Java Programming [Archive] - Printing RTF files in Java
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Printing RTF files in Java
This topic has 2 replies on 1 page.

Posts:2
Registered: 8/5/04
Printing RTF files in Java  
Aug 5, 2004 3:35 PM



 
Hi,

I have a java application (No GUI) that needs to print an RTF file. Could any one provide me links to tutorial/sample codes for doing this?

Thanks a lot,
Vaishali
 

Posts:447
Registered: 3/8/01
Re: Printing RTF files in Java  
Aug 5, 2004 4:38 PM (reply 1 of 2)



 
Look at [url]http://www.fawcette.com/javapro/2002_12/online/print_kgauthier_12_10_02/default_pf.aspx[/url]. They provide an utility class which basically lets you do this in 1 line, by creating a JEditorPane with your document and passing it to a method there.
 

Posts:11
Registered: 8/3/04
Re: Printing RTF files in Java  
Aug 6, 2004 12:58 AM (reply 2 of 2)



 
Or if you want to do it the hard way check:
http://java.sun.com/products/java-media/2D/forDevelopers/sdk12print.html

Which is the printing api tutorial. Basicly you'll need a component to do the rendering for you
and draw the rendered data in a graphics context which can be transmitted to the printer.

hth
 
This topic has 2 replies on 1 page.