HI, I want to print a rtf document in java for which i have to convert an xml into rtf using style sheet. how can i do that.
Joined: Oct 10, 2003
tina Things to check out -- for xml parsing - SAXParser (unless you prefer the DOM), for outputing rtf - javax.swing.text.rtf and the RTFEditorKit. I wrote a servlet years ago that converted an xml document to rtf, but that was before RTF support was built in to java. I was reading the RTF spec and building classes to output different parts of the RTF. I would not recommend that approach. Don
Joined: Oct 09, 2003
I've worked on converting XML to RTF, and so far the "cleanest" tool I can recommend to use is RFK (RTF Formatting Kit), however I still am not impressed with it since it has no support for Windows Drawing Objects used to make diagrams and other drawings. The other issue I had with it is that this tool does not come with an API, I had to write a script to access it and that becomes inconvenient at times. Another thing that might be useful in the near future is XML FOP (XML Formatting Object Processor). This is being worked on by Apache XML group, however they still do not have RTF support, although they propose to have it. They will integrate JFor for the RTF support which to me is a tool in its embryonic stage. There may be other tools I may not be aware of but most of the ones I have come across are nothing to woo about. :roll: Here are the links for the FOP project. http://xml.apache.org/fop/index.html http://xml.apache.org/fop/output.html