• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to print a RTF document using java?

 
Aj Parsekar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic