HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.rtf.RtfWriter2 Class Reference
Inheritance diagram for iTextSharp.text.rtf.RtfWriter2:
iTextSharp.text.DocWriter iTextSharp.text.IDocListener iTextSharp.text.IElementListener

Public Member Functions

override void ResetHeader ()
 
override void ResetFooter ()
 
override void ResetPageCount ()
 
override void Open ()
 
override void Close ()
 
override bool Add (IElement element)
 
override bool NewPage ()
 
override bool SetMargins (float left, float right, float top, float bottom)
 
override bool SetPageSize (Rectangle rect)
 
void SetAutogenerateTOCEntries (bool autogenerate)
 
RtfDocumentSettings GetDocumentSettings ()
 
void ImportRtfDocument (Stream documentSource)
 
void ImportRtfDocument (Stream documentSource, IEventListener[] events)
 
void ImportRtfFragment (Stream documentSource, RtfImportMappings mappings)
 
void ImportRtfFragment (Stream documentSource, RtfImportMappings mappings, IEventListener[] events)
 
void ImportRtfDocumentIntoElement (IElement elem, FileStream documentSource)
 
void ImportRtfDocumentIntoElement (IElement elem, FileStream documentSource, IEventListener[] events)
 
- Public Member Functions inherited from iTextSharp.text.DocWriter
virtual void Pause ()
 Let the writer know that all writing has to be paused. More...
 
bool IsPaused ()
 
virtual void Resume ()
 Let the writer know that writing may be resumed. More...
 
virtual void Flush ()
 Flushes the Stream. More...
 
virtual bool SetMarginMirroring (bool marginMirroring)
 
virtual bool SetMarginMirroringTopBottom (bool MarginMirroring)
 

Static Public Member Functions

static RtfWriter2 GetInstance (Document doc, Stream os)
 
- Static Public Member Functions inherited from iTextSharp.text.DocWriter
static byte[] GetISOBytes (string text)
 Converts a string into a Byte array according to the ISO-8859-1 codepage. More...
 

Protected Member Functions

 RtfWriter2 (Document doc, Stream os)
 
- Protected Member Functions inherited from iTextSharp.text.DocWriter
 DocWriter ()
 
 DocWriter (Document document, Stream os)
 Constructs a DocWriter. More...
 
void Write (string str)
 Writes a string to the stream. More...
 
void AddTabs (int indent)
 Writes a number of tabs. More...
 
void Write (string key, string value)
 Writes a key-value pair to the stream. More...
 
void WriteStart (string tag)
 Writes a starttag to the stream. More...
 
void WriteEnd (string tag)
 Writes an endtag to the stream. More...
 
void WriteEnd ()
 Writes an endtag to the stream. More...
 
bool WriteMarkupAttributes (Properties markup)
 Writes the markup attributes of the specified MarkupAttributes object to the stream. More...
 

Properties

override HeaderFooter Header [set]
 
override HeaderFooter Footer [set]
 
override int PageCount [set]
 
- Properties inherited from iTextSharp.text.DocWriter
virtual HeaderFooter Header [set]
 Changes the header of this document. More...
 
virtual HeaderFooter Footer [set]
 Changes the footer of this document. More...
 
virtual int PageCount [set]
 Sets the page number. More...
 
virtual bool CloseStream [get, set]
 
- Properties inherited from iTextSharp.text.IDocListener
int PageCount [set]
 Sets the page number. More...
 
HeaderFooter Header [set]
 Changes the header of this document. More...
 
HeaderFooter Footer [set]
 Changes the footer of this document. More...
 

Additional Inherited Members

- Static Public Attributes inherited from iTextSharp.text.DocWriter
const byte NEWLINE = (byte)'\n'
 This is some byte that is often used. More...
 
const byte TAB = (byte)'\t'
 This is some byte that is often used. More...
 
const byte LT = (byte)'<'
 This is some byte that is often used. More...
 
const byte SPACE = (byte)' '
 This is some byte that is often used. More...
 
const byte EQUALS = (byte)'='
 This is some byte that is often used. More...
 
const byte QUOTE = (byte)'\"'
 This is some byte that is often used. More...
 
const byte GT = (byte)'>'
 This is some byte that is often used. More...
 
const byte FORWARD = (byte)'/'
 This is some byte that is often used. More...
 
- Protected Attributes inherited from iTextSharp.text.DocWriter
Rectangle pageSize
 The pageSize. More...
 
Document document
 This is the document that has to be written. More...
 
OutputStreamCounter os
 The stream of this writer. More...
 
bool open = false
 Is the writer open for writing? More...
 
bool pause = false
 Do we have to pause all writing actions? More...
 
bool closeStream = true
 

Detailed Description

The RtfWriter allows the creation of rtf documents via the iText system

Version:

Id
RtfWriter2.cs,v 1.11 2008/05/23 17:24:11 psoares33 Exp
Author
Mark Hall (Mark..nosp@m.Hall.nosp@m.@mail.nosp@m..roo.nosp@m.m3b.e.nosp@m.u)

Constructor & Destructor Documentation

◆ RtfWriter2()

iTextSharp.text.rtf.RtfWriter2.RtfWriter2 ( Document  doc,
Stream  os 
)
protected

Constructs a new RtfWriter that listens to the specified Document and writes its output to the Stream.

Parameters
docThe Document that this RtfWriter listens to
osThe Stream to write to

Member Function Documentation

◆ Add()

override bool iTextSharp.text.rtf.RtfWriter2.Add ( IElement  element)
virtual

Adds an Element to the Document

Parameters
elementThe element to be added
Returns
false
Exceptions
DocumentException

Reimplemented from iTextSharp.text.DocWriter.

◆ Close()

override void iTextSharp.text.rtf.RtfWriter2.Close ( )
virtual

Closes the RtfDocument. This causes the document to be written to the specified Stream

Reimplemented from iTextSharp.text.DocWriter.

◆ GetDocumentSettings()

RtfDocumentSettings iTextSharp.text.rtf.RtfWriter2.GetDocumentSettings ( )

Gets the RtfDocumentSettings that specify how the rtf document is generated.

Returns
The current RtfDocumentSettings.

◆ GetInstance()

static RtfWriter2 iTextSharp.text.rtf.RtfWriter2.GetInstance ( Document  doc,
Stream  os 
)
static

Static method to generate RtfWriters

Parameters
docThe Document that this RtfWriter listens to
osThe Stream to write to
Returns
The new RtfWriter

◆ ImportRtfDocument() [1/2]

void iTextSharp.text.rtf.RtfWriter2.ImportRtfDocument ( Stream  documentSource)

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
documentSourceThe Stream to read the RTF document from.
Exceptions
IOExceptionOn errors reading the RTF document.
DocumentExceptionOn errors adding to this RTF document.

◆ ImportRtfDocument() [2/2]

void iTextSharp.text.rtf.RtfWriter2.ImportRtfDocument ( Stream  documentSource,
IEventListener[]  events 
)

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.

Parameters
documentSourceThe Stream to read the RTF document from.
eventListenersThe array of event listeners. May be null
Exceptions
IOException
DocumentException
See also
com.lowagie.text.rtf.parser.RtfParser
com.lowagie.text.rtf.parser.RtfParser::importRtfDocument(Reader, RtfDocument)
Since
2.0.8
Author
Howard Shank

◆ ImportRtfDocumentIntoElement() [1/2]

void iTextSharp.text.rtf.RtfWriter2.ImportRtfDocumentIntoElement ( IElement  elem,
FileStream  documentSource 
)

Adds the complete RTF document to the current RTF element 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
elemThe Element the RTF document is to be imported into.
documentSourceThe Reader to read the RTF document from.
Exceptions
IOExceptionOn errors reading the RTF document.
DocumentExceptionOn errors adding to this RTF document.
Since
2.1.4

◆ ImportRtfDocumentIntoElement() [2/2]

void iTextSharp.text.rtf.RtfWriter2.ImportRtfDocumentIntoElement ( IElement  elem,
FileStream  documentSource,
IEventListener[]  events 
)

Adds the complete RTF document to the current RTF element 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
elemThe Element the RTF document is to be imported into.
documentSourceThe Reader to read the RTF document from.
eventsThe event array for listeners.
Exceptions
IOExceptionOn errors reading the RTF document.
DocumentExceptionOn errors adding to this RTF document.
Since
2.1.4

◆ ImportRtfFragment() [1/2]

void iTextSharp.text.rtf.RtfWriter2.ImportRtfFragment ( Stream  documentSource,
RtfImportMappings  mappings 
)

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
documentSourceThe Stream to read the RTF fragment from.
mappingsThe RtfImportMappings that contain font and color mappings to apply to the fragment.
Exceptions
IOExceptionOn errors reading the RTF fragment.
DocumentExceptionOn errors adding to this RTF fragment.

◆ ImportRtfFragment() [2/2]

void iTextSharp.text.rtf.RtfWriter2.ImportRtfFragment ( Stream  documentSource,
RtfImportMappings  mappings,
IEventListener[]  events 
)

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.

Parameters
documentSourceThe Stream to read the RTF fragment from.
mappingsThe RtfImportMappings that contain font and color mappings to apply to the fragment.
eventListenersThe array of event listeners. May be null
Exceptions
IOExceptionOn errors reading the RTF fragment.
DocumentExceptionOn errors adding to this RTF fragment.
See also
com.lowagie.text.rtf.parser.RtfImportMappings
com.lowagie.text.rtf.parser.RtfParser
com.lowagie.text.rtf.parser.RtfParser::importRtfFragment(Reader, RtfDocument, com.lowagie.text.rtf.parser.RtfImportMappings)
Since
2.0.8
Author
Howard Shank

◆ NewPage()

override bool iTextSharp.text.rtf.RtfWriter2.NewPage ( )
virtual

Adds a page break

Returns
false

Reimplemented from iTextSharp.text.DocWriter.

◆ Open()

override void iTextSharp.text.rtf.RtfWriter2.Open ( )
virtual

Opens the RtfDocument

Reimplemented from iTextSharp.text.DocWriter.

◆ ResetFooter()

override void iTextSharp.text.rtf.RtfWriter2.ResetFooter ( )
virtual

Resets the footer

Reimplemented from iTextSharp.text.DocWriter.

◆ ResetHeader()

override void iTextSharp.text.rtf.RtfWriter2.ResetHeader ( )
virtual

Resets the header

Reimplemented from iTextSharp.text.DocWriter.

◆ ResetPageCount()

override void iTextSharp.text.rtf.RtfWriter2.ResetPageCount ( )
virtual

This method is not supported in the RtfWriter

Reimplemented from iTextSharp.text.DocWriter.

◆ SetAutogenerateTOCEntries()

void iTextSharp.text.rtf.RtfWriter2.SetAutogenerateTOCEntries ( bool  autogenerate)

Whether to automagically generate table of contents entries when adding Chapters or Sections.

Parameters
autogenerateWhether to automatically generate TOC entries

◆ SetMargins()

override bool iTextSharp.text.rtf.RtfWriter2.SetMargins ( float  left,
float  right,
float  top,
float  bottom 
)
virtual

Sets the page margins

Parameters
leftThe left margin
rightThe right margin
topThe top margin
bottomThe bottom margin
Returns
false

Reimplemented from iTextSharp.text.DocWriter.

◆ SetPageSize()

override bool iTextSharp.text.rtf.RtfWriter2.SetPageSize ( Rectangle  rect)
virtual

Sets the size of the page

Parameters
rectA Rectangle representing the page
Returns
false

Reimplemented from iTextSharp.text.DocWriter.

Property Documentation

◆ Footer

override HeaderFooter iTextSharp.text.rtf.RtfWriter2.Footer
set

Sets the footer to use

Parameters
hfThe HeaderFooter to use

◆ Header

override HeaderFooter iTextSharp.text.rtf.RtfWriter2.Header
set

Sets the header to use

Parameters
hfThe HeaderFooter to use

◆ PageCount

override int iTextSharp.text.rtf.RtfWriter2.PageCount
set

This method is not supported in the RtfWriter

Parameters
iUnused

The documentation for this class was generated from the following file: