com.lowagie.text.rtf.direct
public class RtfParser extends Object
Version: $Revision: 2377 $
Field Summary | |
---|---|
RtfColorTableParser | colorTableParser
The RtfColorTableParser to use for parsing the color table. |
RtfFontTableParser | fontTableParser
The RtfFontTableParser to use for parsing the font table. |
RtfImportHeader | importHeader
The RtfImportHeader to store imported font and color mappings in. |
static int | PARSER_IN_COLOR_TABLE
Currently the RTF color table is being parsed. |
static int | PARSER_IN_DOCUMENT
Currently the RTF document content is being parsed. |
static int | PARSER_IN_FONT_TABLE
Currently the RTF font table is being parsed. |
static int | PARSER_IN_HEADER
Currently the RTF document header is being parsed. |
static int | PARSER_IN_INFO_GROUP
Currently the RTF info group is being parsed. |
RtfDocument | rtfDoc
The RtfDocument to add the RTF document or fragment to. |
int | state
The current parser state. |
RtfTokeniser | tokeniser
The RtfTokeniser to use for tokenising the RTF document or fragment. |
Method Summary | |
---|---|
void | handleCloseGroup(int groupLevel)
Handles close group tokens. |
void | handleCtrlCharacter(String ctrlCharacter, int groupLevel)
Handles single control character tokens.
|
void | handleCtrlWord(String ctrlWord, int groupLevel)
Handles control word tokens. |
void | handleImportMappings(RtfImportMappings importMappings)
Imports the mappings defined in the RtfImportMappings into the
RtfImportHeader of this RtfParser.
|
void | handleOpenGroup(int groupLevel)
Handles open group tokens.
|
void | handleText(String text, int groupLevel)
Handles text tokens. |
void | importRtfDocument(Reader reader, RtfDocument rtfDoc)
Imports a complete RTF document.
|
void | importRtfFragment(Reader reader, RtfDocument rtfDoc, RtfImportMappings importMappings)
Imports an RTF fragment.
|
Parameters: groupLevel The current group nesting level.
Parameters: ctrlCharacter The control character to handle. groupLevel The current group nesting level.
Parameters: ctrlWord The control word to handle. groupLevel The current group nesting level.
Parameters: importMappings The RtfImportMappings to import.
Parameters: groupLevel The current group nesting level.
Parameters: text The text token to handle. groupLevel The current group nesting level.
Parameters: reader The Reader to read the RTF document from. rtfDoc The RtfDocument to add the imported document to.
Throws: IOException On I/O errors.
Parameters: reader The Reader to read the RTF fragment from. rtfDoc The RTF document to add the RTF fragment to. importMappings The RtfImportMappings defining font and color mappings for the fragment.
Throws: IOException On I/O errors.