Save This Page
Home » iText-src-2.1.3 » com.lowagie » text » rtf » [javadoc | source]
com.lowagie.text.rtf
public class: RtfWriter2 [javadoc | source]
java.lang.Object
   com.lowagie.text.DocWriter
      com.lowagie.text.rtf.RtfWriter2

All Implemented Interfaces:
    DocListener

The RtfWriter allows the creation of rtf documents via the iText system Version: $Id: RtfWriter2.java 3440 2008-05-25 18:16:48Z howard_s $
Fields inherited from com.lowagie.text.DocWriter:
NEWLINE,  TAB,  LT,  SPACE,  EQUALS,  QUOTE,  GT,  FORWARD,  pageSize,  document,  os,  open,  pause,  closeStream
Constructor:
 protected RtfWriter2(Document doc,
    OutputStream os) 
    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
    os - The OutputStream to write to
Method from com.lowagie.text.rtf.RtfWriter2 Summary:
add,   clearTextWrap,   close,   getDocumentSettings,   getInstance,   importRtfDocument,   importRtfDocument,   importRtfFragment,   importRtfFragment,   newPage,   open,   resetFooter,   resetHeader,   resetPageCount,   setAutogenerateTOCEntries,   setFooter,   setHeader,   setMargins,   setPageCount,   setPageSize
Methods from com.lowagie.text.DocWriter:
add,   addTabs,   close,   flush,   getISOBytes,   isCloseStream,   isPaused,   newPage,   open,   pause,   resetFooter,   resetHeader,   resetPageCount,   resume,   setCloseStream,   setFooter,   setHeader,   setMarginMirroring,   setMargins,   setPageCount,   setPageSize,   write,   write,   writeEnd,   writeEnd,   writeMarkupAttributes,   writeStart
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.rtf.RtfWriter2 Detail:
 public boolean add(Element element) throws DocumentException 
    Adds an Element to the Document
 public  void clearTextWrap() 
    This method is not supported in the RtfWriter
 public  void close() 
    Closes the RtfDocument. This causes the document to be written to the specified OutputStream
 public RtfDocumentSettings getDocumentSettings() 
    Gets the RtfDocumentSettings that specify how the rtf document is generated.
 public static RtfWriter2 getInstance(Document doc,
    OutputStream os) 
    Static method to generate RtfWriters
 public  void importRtfDocument(FileInputStream documentSource) throws IOException, DocumentException 
    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.
 public  void importRtfDocument(InputStream documentSource,
    EventListener[] events) throws IOException, DocumentException 
    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. Uses new RtfParser object. (author: Howard Shank)
 public  void importRtfFragment(InputStream documentSource,
    RtfImportMappings mappings) throws IOException, DocumentException 
    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.
 public  void importRtfFragment(InputStream documentSource,
    RtfImportMappings mappings,
    EventListener[] events) throws IOException, DocumentException 
    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. Uses new RtfParser object. (author: Howard Shank)
 public boolean newPage() 
    Adds a page break
 public  void open() 
    Opens the RtfDocument
 public  void resetFooter() 
    Resets the footer
 public  void resetHeader() 
    Resets the header
 public  void resetPageCount() 
    This method is not supported in the RtfWriter
 public  void setAutogenerateTOCEntries(boolean autogenerate) 
    Whether to automagically generate table of contents entries when adding Chapters or Sections.
 public  void setFooter(HeaderFooter hf) 
    Sets the footer to use
 public  void setHeader(HeaderFooter hf) 
    Sets the header to use
 public boolean setMargins(float left,
    float right,
    float top,
    float bottom) 
    Sets the page margins
 public  void setPageCount(int i) 
    This method is not supported in the RtfWriter
 public boolean setPageSize(Rectangle rect) 
    Sets the size of the page