Meaningless Drivel is fun!*
The moose likes Other JSE/JEE APIs and the fly likes How to print a RTF document using java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "How to print a RTF document using java?" Watch "How to print a RTF document using java?" New topic

How to print a RTF document using java?

Aj Parsekar

Joined: Apr 14, 2004
Posts: 6
I am trying to print a RTF document using java for a batch job which is to be run on an AIX server. This document contains merge fields from a template and a linked image as the header.
I have tried two approaches and hit roadblocks on both -
1. The Java™ Print Service API
The printer treats the file to be printed as a text document and prints the ASCII values instead of formatted RTF
2. Swing (JEditorPane/RTFEditorKit)
This does not let me print grahics or merge fields although it does print the formatted RTF text correctly
Any help on getting getting past these issues is greatly appreciated. Also please let me know if you can think of any other way to print. The project is not keen on buying a third party API so I cannot go that route.

Thanks for your time
I agree. Here's the link:
subject: How to print a RTF document using java?
Similar Threads
How to remove clickable elements around text fields in JasperReports' RTF output?
Java way of doing this
Tool to convert a rtf or pdf document to image programatically
Regarding the IText API
Convert HTML to RTF