com.lowagie.text.rtf.document
public class RtfDocument extends RtfElement
Since: 1.x
Version: $Id: RtfDocument.java 3458 2008-05-26 16:19:21Z howard_s $
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. |
static byte[] | FSC_BACKSLASH |
static byte[] | FSC_HEX_PREFIX |
static byte[] | FSC_LINE |
static byte[] | FSC_NEWPAGE |
static byte[] | FSC_PAGE_PAR |
static byte[] | FSC_PAR |
static byte[] | FSC_TAB |
static byte[] | FSC_UNI_PREFIX |
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
|
void | filterSpecialChar(OutputStream out, String str, boolean useHex, boolean softLineBreaks)
Writes the given string to the given OutputStream encoding the string characters.
|
boolean | getAutogenerateTOCEntries()
Get whether to automatically 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 initializes the data cache. |
void | outputDebugLinebreak(OutputStream result)
Helper method outputs linebreak in document if debugging is turned on. |
void | setAutogenerateTOCEntries(boolean autogenerate)
Whether to automagically generate table of contents entries when
adding Chapters or Sections.
|
static boolean | subMatch(String str, int soff, byte[] m)
Returns true if m.length characters in str, starting at offset soff
match the bytes in the given array m.
|
void | writeContent(OutputStream out)
unused |
void | writeDocument(OutputStream out)
Writes the document
|
Parameters: element The element to add
Parameters: out destination OutputStream str string to write useHex if true
hex encoding characters is preferred to unicode encoding if possible softLineBreaks if true
return characters are written as soft line breaks
Throws: IOException
Returns: Whether 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: result the OutputStream to write the linebreak to.
Throws: IOException
Since: 2.1.3
Parameters: autogenerate Whether to automatically generate TOC entries
true
if m.length characters in str, starting at offset soff
match the bytes in the given array m.
Parameters: str the string to search for a match soff the starting offset in str m the array to match
Returns: true
if there is match
Parameters: out The OutputStream
to write the RTF document to.