Reputation: 30895
i need to understand html + css files and convert it to somthing like rtf layot in java now i understand i need somekind of html parser but what i need to do from there ? how can i implement html-css convertor ? is there somekind of patern or method for such jobs?
Upvotes: 0
Views: 1060
Reputation: 63734
There is the The Flying Saucer Project that let you render XHTML to PDF. Maybe that could be used instead of RTF or the resulting PDF could be converted to RTF?
Upvotes: 0
Reputation: 3485
I'd do the following:
Note: although I didn't find an xsl file for that conversion directly I'm sure there is one anywhere
Upvotes: 1
Reputation: 26271
You should check out HTMLEditorKit. It provides some support for CSS rendering. There is also an RTFEditorKit for writing, although it is not entirely reliable (last I checked, several years ago).
Is there a reason you need to use Java instead of just loading the HTML in Word (or some other editor) and saving it as RTF? Also check this W3C link.
Upvotes: 1