| |
|
| java.lang.Object com.lowagie.text.DocWriter com.lowagie.text.rtf.RtfWriter2
RtfWriter2 | public class RtfWriter2 extends DocWriter (Code) | | The RtfWriter allows the creation of rtf documents via the iText system
Version: $Id: RtfWriter2.java 2623 2007-02-23 22:28:28Z xlv $
author: Mark Hall (mhall@edu.uni-klu.ac.at) |
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. |
RtfWriter2 | protected RtfWriter2(Document doc, OutputStream os)(Code) | | Constructs a new RtfWriter that listens to the specified Document and
writes its output to the OutputStream.
Parameters: doc - The Document that this RtfWriter listens to Parameters: os - The OutputStream to write to |
clearTextWrap | public void clearTextWrap()(Code) | | This method is not supported in the RtfWriter
|
close | public void close()(Code) | | Closes the RtfDocument. This causes the document to be written
to the specified OutputStream
|
getDocumentSettings | public RtfDocumentSettings getDocumentSettings()(Code) | | Gets the RtfDocumentSettings that specify how the rtf document is generated.
The current RtfDocumentSettings. |
getInstance | public static RtfWriter2 getInstance(Document doc, OutputStream os)(Code) | | Static method to generate RtfWriters
Parameters: doc - The Document that this RtfWriter listens to Parameters: os - The OutputStream to write to The new RtfWriter |
importRtfDocument | public void importRtfDocument(Reader documentSource) throws IOException, DocumentException(Code) | | Adds the complete RTF document to the current RTF document being generated.
It will parse the font and color tables and correct the font and color references
so that the imported RTF document retains its formattings.
Parameters: documentSource - The Reader to read the RTF document from. throws: IOException - On errors reading the RTF document. throws: DocumentException - On errors adding to this RTF document. |
importRtfFragment | public void importRtfFragment(Reader documentSource, RtfImportMappings mappings) throws IOException, DocumentException(Code) | | Adds a fragment of an RTF document to the current RTF document being generated.
Since this fragment doesn't contain font or color tables, all fonts and colors
are mapped to the default font and color. If the font and color mappings are
known, they can be specified via the mappings parameter.
Parameters: documentSource - The Reader to read the RTF fragment from. Parameters: mappings - The RtfImportMappings that contain font and color mappings to apply to the fragment. throws: IOException - On errors reading the RTF fragment. throws: DocumentException - On errors adding to this RTF fragment. |
newPage | public boolean newPage()(Code) | | Adds a page break
false |
resetFooter | public void resetFooter()(Code) | | Resets the footer
|
resetHeader | public void resetHeader()(Code) | | Resets the header
|
resetPageCount | public void resetPageCount()(Code) | | This method is not supported in the RtfWriter
|
setAutogenerateTOCEntries | public void setAutogenerateTOCEntries(boolean autogenerate)(Code) | | Whether to automagically generate table of contents entries when
adding Chapters or Sections.
Parameters: autogenerate - Whether to automatically generate TOC entries |
setDataCacheStyle | public void setDataCacheStyle(int dataCacheStyle)(Code) | | 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. throws: IOException - If the disk cache could not be initialised. |
setFooter | public void setFooter(HeaderFooter hf)(Code) | | Sets the footer to use
Parameters: hf - The HeaderFooter to use |
setHeader | public void setHeader(HeaderFooter hf)(Code) | | Sets the header to use
Parameters: hf - The HeaderFooter to use |
setMargins | public boolean setMargins(float left, float right, float top, float bottom)(Code) | | Sets the page margins
Parameters: left - The left margin Parameters: right - The right margin Parameters: top - The top margin Parameters: bottom - The bottom margin false |
setPageCount | public void setPageCount(int i)(Code) | | This method is not supported in the RtfWriter
Parameters: i - Unused |
setPageSize | public boolean setPageSize(Rectangle rect)(Code) | | Sets the size of the page
Parameters: rect - A Rectangle representing the page false |
|
|
|