com.lowagie.text.rtf
public class RtfWriter2 extends DocWriter
Field Summary | |
---|---|
RtfDocument | rtfDoc
The RtfDocument this RtfWriter is creating |
Constructor Summary | |
---|---|
protected | RtfWriter2(Document doc, OutputStream os)
Constructs a new RtfWriter that listens to the specified Document and
writes its output to the OutputStream.
|
Method Summary | |
---|---|
boolean | add(Element element)
Adds an Element to the Document
|
void | clearTextWrap()
This method is not supported in the RtfWriter |
void | close()
Closes the RtfDocument. |
RtfDocumentSettings | getDocumentSettings()
Gets the RtfDocumentSettings that specify how the rtf document is generated.
|
static RtfWriter2 | getInstance(Document doc, OutputStream os)
Static method to generate RtfWriters
|
void | importRtfDocument(Reader documentSource)
Adds the complete RTF document to the current RTF document being generated.
|
void | importRtfFragment(Reader documentSource, RtfImportMappings mappings)
Adds a fragment of an RTF document to the current RTF document being generated.
|
boolean | newPage()
Adds a page break
|
void | open()
Opens the RtfDocument |
void | resetFooter()
Resets the footer |
void | resetHeader()
Resets the header |
void | resetPageCount()
This method is not supported in the RtfWriter |
void | setAutogenerateTOCEntries(boolean autogenerate)
Whether to automagically generate table of contents entries when
adding Chapters or Sections.
|
void | setDataCacheStyle(int dataCacheStyle)
Sets the rtf data cache style to use. |
void | setFooter(HeaderFooter hf)
Sets the footer to use
|
void | setHeader(HeaderFooter hf)
Sets the header to use
|
boolean | setMargins(float left, float right, float top, float bottom)
Sets the page margins
|
void | setPageCount(int i)
This method is not supported in the RtfWriter |
boolean | setPageSize(Rectangle rect)
Sets the size of the page
|
Parameters: doc The Document that this RtfWriter listens to os The OutputStream to write to
Parameters: element The element to be added
Returns: false
Throws: DocumentException
Returns: The current RtfDocumentSettings.
Parameters: doc The Document that this RtfWriter listens to os The OutputStream to write to
Returns: The new RtfWriter
Parameters: documentSource The Reader to read the RTF document from.
Throws: IOException On errors reading the RTF document. DocumentException On errors adding to this RTF document.
Parameters: documentSource The Reader to read the RTF fragment from. mappings The RtfImportMappings that contain font and color mappings to apply to the fragment.
Throws: IOException On errors reading the RTF fragment. DocumentException On errors adding to this RTF fragment.
Returns: false
Throws: IOException
Parameters: autogenerate Whether to automatically generate TOC entries
Deprecated: Use RtfWriter2.getDocumentSettings().setDataCacheStyle(...);
Sets the rtf data cache style to use. Valid values are given in the RtfDataCache class.Parameters: dataCacheStyle The style to use.
Throws: DocumentException If data has already been written into the data cache. IOException If the disk cache could not be initialised.
Parameters: hf The HeaderFooter to use
Parameters: hf The HeaderFooter to use
Parameters: left The left margin right The right margin top The top margin bottom The bottom margin
Returns: false
Parameters: i Unused
Parameters: rect A Rectangle representing the page
Returns: false