com.lowagie.text.rtf.document
public class RtfDocument extends RtfElement
Field Summary | |
---|---|
boolean | autogenerateTOCEntries
Whether to automatically generate TOC entries for Chapters and Sections. |
RtfDataCache | data
Stores the actual document data |
RtfDocumentHeader | documentHeader
The RtfDocumentHeader that handles all document header methods |
RtfDocumentSettings | documentSettings
The RtfDocumentSettings for this RtfDocument. |
RtfBasicElement | lastElementWritten
The last RtfBasicElement that was added directly to the RtfDocument. |
RtfMapper | mapper
The RtfMapper to use in this RtfDocument |
ArrayList | previousRandomInts
Stores integers that have been generated as unique random numbers |
static byte[] | RTF_DOCUMENT
Constant for the Rtf document start |
Constructor Summary | |
---|---|
RtfDocument()
The default constructor for a RtfDocument |
Method Summary | |
---|---|
void | add(RtfBasicElement element)
Adds an element to the rtf document
|
String | filterSpecialChar(String str, boolean useHex, boolean softLineBreaks)
Replaces special characters with their unicode values |
boolean | getAutogenerateTOCEntries()
Get whether to autmatically generate table of contents entries
|
RtfDocumentHeader | getDocumentHeader()
Gets the RtfDocumentHeader of this RtfDocument
|
RtfDocumentSettings | getDocumentSettings()
Gets the RtfDocumentSettings that specify how the rtf document is generated.
|
RtfBasicElement | getLastElementWritten()
Gets the last RtfBasicElement that was directly added to the RtfDocument.
|
RtfMapper | getMapper()
Gets the RtfMapper object of this RtfDocument
|
int | getRandomInt()
Generates a random integer that is unique with respect to the document.
|
void | open()
Opens the RtfDocument and initialises the data cache. |
void | setAutogenerateTOCEntries(boolean autogenerate)
Whether to automagically generate table of contents entries when
adding Chapters or Sections.
|
void | writeDocument(OutputStream out)
Writes the document
|
Parameters: element The element to add
Parameters: str The original String
useHex indicated if the hexadecimal value has to be used softLineBreaks whether to use soft line breaks instead of default hard ones.
Returns: The converted String
Returns: Wheter to automatically generate TOC entries
Returns: The RtfDocumentHeader of this RtfDocument
Returns: The current RtfDocumentSettings.
Returns: The last RtfBasicElement that was directly added to the RtfDocument.
Returns: The RtfMapper
Returns: A random int
Parameters: autogenerate Whether to automatically generate TOC entries
Parameters: out The OutputStream
to write the RTF document to.