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(FileInputStream documentSource)
Adds the complete RTF document to the current RTF document being generated.
|
void | importRtfDocument(InputStream documentSource, EventListener[] events)
Adds the complete RTF document to the current RTF document being generated.
|
void | importRtfDocumentIntoElement(Element elem, FileInputStream documentSource)
Adds the complete RTF document to the current RTF element being generated.
|
void | importRtfDocumentIntoElement(Element elem, FileInputStream documentSource, EventListener[] events)
Adds the complete RTF document to the current RTF element being generated.
|
void | importRtfFragment(InputStream documentSource, RtfImportMappings mappings)
Adds a fragment of an RTF document to the current RTF document being generated.
|
void | importRtfFragment(InputStream documentSource, RtfImportMappings mappings, EventListener[] events)
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 | 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.
Since: 2.1.0
Parameters: documentSource The InputStream to read the RTF document from. events The array of event listeners. May be null
Throws: IOException DocumentException
Since: 2.0.8
Parameters: elem The Element the RTF document is to be imported into. 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.
Since: 2.1.4
Parameters: elem The Element the RTF document is to be imported into. documentSource The Reader to read the RTF document from. events The event array for listeners.
Throws: IOException On errors reading the RTF document. DocumentException On errors adding to this RTF document.
Since: 2.1.4
Parameters: documentSource The InputStream 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.
Since: 2.1.0
Parameters: documentSource The InputStream to read the RTF fragment from. mappings The RtfImportMappings that contain font and color mappings to apply to the fragment. events The array of event listeners. May be null
Throws: IOException On errors reading the RTF fragment. DocumentException On errors adding to this RTF fragment.
Since: 2.0.8
See Also: RtfImportMappings RtfParser RtfParser
Returns: false
Parameters: autogenerate Whether to automatically generate TOC entries
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