Version 4 (modified by diana, 16 years ago) (diff) |
---|
Analysis
Overview
Improve RTF import so it supports text with style
Task requirements
- Preserve the following things when importing RTF
- Font (if present, else a default font
- Font style
- size
- foreground color
- Do not import other content (other than text)
- Optional - preserve paragraph options if possible
Task result
Code.
Implementation idea
Use the attached rtf-s to ensure the style is preserved. Use javax.swing.text.rtf.RTFEditorKit class in order to read the document and to "translate" the rtf document to styled document. Not all of the styles saved in rtf are translated in the document and that's why the background color and the strike-through won't be preserved.
Related
(Add links to related tasks that could be useful or helpful.)
How to demo
Create an empty book and insert a rtf with text styling.
Design
(Describe your design here.)
Implementation
(Describe and link the implementation results here (from the wiki or the repository).)
Testing
(Place the testing results here.)
Comments
(Write comments for this or later revisions here.)
Attachments
- smallrtf.rtf (11.0 KB) - added by deyan 16 years ago.
- allrtf.rtf (181.1 KB) - added by deyan 16 years ago.