menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class RtfTextWriter - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class RtfTextWriter

    Rtf text writer used for converting rtf string into rtf format.

    Inheritance
    System.Object
    System.MarshalByRefObject
    System.IO.TextWriter
    RtfTextWriter
    Implements
    System.IDisposable
    Inherited Members
    System.IO.TextWriter.Close()
    System.IO.TextWriter.CoreNewLine
    System.IO.TextWriter.Dispose()
    System.IO.TextWriter.Dispose(System.Boolean)
    System.IO.TextWriter.Flush()
    System.IO.TextWriter.FlushAsync()
    System.IO.TextWriter.FormatProvider
    System.IO.TextWriter.NewLine
    System.IO.TextWriter.Null
    System.IO.TextWriter.Synchronized(System.IO.TextWriter)
    System.IO.TextWriter.Write(System.Decimal)
    System.IO.TextWriter.Write(System.String, System.Object, System.Object, System.Object)
    System.IO.TextWriter.Write(System.UInt64)
    System.IO.TextWriter.WriteAsync(System.Char)
    System.IO.TextWriter.WriteAsync(System.Char[])
    System.IO.TextWriter.WriteAsync(System.Char[], System.Int32, System.Int32)
    System.IO.TextWriter.WriteAsync(System.String)
    System.IO.TextWriter.WriteLine(System.Decimal)
    System.IO.TextWriter.WriteLine(System.String, System.Object, System.Object, System.Object)
    System.IO.TextWriter.WriteLine(System.UInt64)
    System.IO.TextWriter.WriteLineAsync()
    System.IO.TextWriter.WriteLineAsync(System.Char)
    System.IO.TextWriter.WriteLineAsync(System.Char[])
    System.IO.TextWriter.WriteLineAsync(System.Char[], System.Int32, System.Int32)
    System.IO.TextWriter.WriteLineAsync(System.String)
    System.MarshalByRefObject.CreateObjRef(System.Type)
    System.MarshalByRefObject.GetLifetimeService()
    System.MarshalByRefObject.InitializeLifetimeService()
    System.MarshalByRefObject.MemberwiseClone(System.Boolean)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Syncfusion.XlsIO.Implementation
    Assembly: Syncfusion.XlsIO.Base.dll
    Syntax
    public class RtfTextWriter : TextWriter, IDisposable

    Constructors

    RtfTextWriter()

    Declaration
    public RtfTextWriter()

    RtfTextWriter(Boolean)

    Declaration
    public RtfTextWriter(bool enableFormatting)
    Parameters
    Type Name Description
    System.Boolean enableFormatting

    RtfTextWriter(TextWriter)

    Declaration
    public RtfTextWriter(TextWriter underlyingWriter)
    Parameters
    Type Name Description
    System.IO.TextWriter underlyingWriter

    RtfTextWriter(TextWriter, Boolean)

    Declaration
    public RtfTextWriter(TextWriter underlyingWriter, bool enableFormatting)
    Parameters
    Type Name Description
    System.IO.TextWriter underlyingWriter
    System.Boolean enableFormatting

    Properties

    Encoding

    Returns current Encoding.

    Declaration
    public override Encoding Encoding { get; }
    Property Value
    Type
    System.Text.Encoding
    Overrides
    System.IO.TextWriter.Encoding

    Escape

    Declaration
    public bool Escape { get; set; }
    Property Value
    Type
    System.Boolean

    Methods

    AddColor(Color)

    Adds color to the colors table.

    Declaration
    public int AddColor(Color color)
    Parameters
    Type Name Description
    System.Drawing.Color color
    Returns
    Type
    System.Int32

    AddFont(Font)

    Adds new font to the collection.

    Declaration
    public int AddFont(Font font)
    Parameters
    Type Name Description
    System.Drawing.Font font

    Font to add.

    Returns
    Type Description
    System.Int32

    Index of the font.

    GetImageRTF(String)

    Gets the image RTF.

    Declaration
    protected string GetImageRTF(string rtf)
    Parameters
    Type Name Description
    System.String rtf

    The RTF.

    Returns
    Type
    System.String

    OutputTabs()

    Declaration
    protected virtual void OutputTabs()

    ToString()

    Returns string that implement current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    Returns string that implement current object.

    Overrides
    System.Object.ToString()

    Write(Boolean)

    Writes a bool to the text stream.

    Declaration
    public override void Write(bool value)
    Parameters
    Type Name Description
    System.Boolean value

    Bool param to write.

    Overrides
    System.IO.TextWriter.Write(System.Boolean)

    Write(Char)

    Writes a character to the text stream.

    Declaration
    public override void Write(char value)
    Parameters
    Type Name Description
    System.Char value

    Char value to write.

    Overrides
    System.IO.TextWriter.Write(System.Char)

    Write(Char[])

    Writes a array of characters to the text stream.

    Declaration
    public override void Write(char[] buffer)
    Parameters
    Type Name Description
    System.Char[] buffer

    Array param to write.

    Overrides
    System.IO.TextWriter.Write(System.Char[])

    Write(Char[], Int32, Int32)

    Writes a subarray of characters to the text stream.

    Declaration
    public override void Write(char[] buffer, int index, int count)
    Parameters
    Type Name Description
    System.Char[] buffer

    The character array to write data from.

    System.Int32 index

    Starting index in the buffer.

    System.Int32 count

    The number of characters to write.

    Overrides
    System.IO.TextWriter.Write(System.Char[], System.Int32, System.Int32)

    Write(Double)

    Writes a double to the text stream.

    Declaration
    public override void Write(double value)
    Parameters
    Type Name Description
    System.Double value

    Double param to write.

    Overrides
    System.IO.TextWriter.Write(System.Double)

    Write(Int32)

    Writes a int value to the text stream.

    Declaration
    public override void Write(int value)
    Parameters
    Type Name Description
    System.Int32 value

    Int value to write.

    Overrides
    System.IO.TextWriter.Write(System.Int32)

    Write(Int64)

    Writes a long value to the text stream.

    Declaration
    public override void Write(long value)
    Parameters
    Type Name Description
    System.Int64 value

    Long value to write.

    Overrides
    System.IO.TextWriter.Write(System.Int64)

    Write(Object)

    Writes a object to the text stream.

    Declaration
    public override void Write(object value)
    Parameters
    Type Name Description
    System.Object value

    Object value to write.

    Overrides
    System.IO.TextWriter.Write(System.Object)

    Write(Single)

    Writes a float value to the text stream.

    Declaration
    public override void Write(float value)
    Parameters
    Type Name Description
    System.Single value

    Float value to write.

    Overrides
    System.IO.TextWriter.Write(System.Single)

    Write(String)

    Writes a string to the text stream.

    Declaration
    public override void Write(string s)
    Parameters
    Type Name Description
    System.String s

    String to write.

    Overrides
    System.IO.TextWriter.Write(System.String)

    Write(String, Object)

    Writes out a formatted string, using the same semantics as String.Format.

    Declaration
    public override void Write(string format, object arg0)
    Parameters
    Type Name Description
    System.String format

    The formatting string.

    System.Object arg0

    An object to write into the formatted string.

    Overrides
    System.IO.TextWriter.Write(System.String, System.Object)

    Write(String, Object, Object)

    Writes out a formatted string, using the same semantics as String.Format.

    Declaration
    public override void Write(string format, object arg0, object arg1)
    Parameters
    Type Name Description
    System.String format

    The formatting string.

    System.Object arg0

    An object to write into the formatted string.

    System.Object arg1

    An object to write into the formatted string.

    Overrides
    System.IO.TextWriter.Write(System.String, System.Object, System.Object)

    Write(String, Object[])

    Writes out a formatted string, using the same semantics as String.Format.

    Declaration
    public override void Write(string format, params object[] arg)
    Parameters
    Type Name Description
    System.String format

    The formatting string.

    System.Object[] arg

    The object array to write into the formatted string.

    Overrides
    System.IO.TextWriter.Write(System.String, System.Object[])

    Write(UInt32)

    Writes a uint value to the text stream.

    Declaration
    [CLSCompliant(false)]
    public override void Write(uint value)
    Parameters
    Type Name Description
    System.UInt32 value

    Uint value to write.

    Overrides
    System.IO.TextWriter.Write(System.UInt32)

    WriteBackColorAttribute(Color)

    Declaration
    public void WriteBackColorAttribute(Color color)
    Parameters
    Type Name Description
    System.Drawing.Color color

    WriteColorTable()

    Writes colors table into inner text writer.

    Declaration
    public void WriteColorTable()

    WriteFont(IFont)

    Declaration
    public void WriteFont(IFont font)
    Parameters
    Type Name Description
    IFont font

    WriteFont(Font)

    Declaration
    public void WriteFont(Font font)
    Parameters
    Type Name Description
    System.Drawing.Font font

    WriteFontAttribute(Font)

    Declaration
    public void WriteFontAttribute(Font font)
    Parameters
    Type Name Description
    System.Drawing.Font font

    WriteFontItalicBoldStriked(Font)

    Declaration
    public void WriteFontItalicBoldStriked(Font font)
    Parameters
    Type Name Description
    System.Drawing.Font font

    WriteFontTable()

    Writes fonts table into inner text writer.

    Declaration
    public void WriteFontTable()

    WriteForeColorAttribute(Color)

    Declaration
    public void WriteForeColorAttribute(Color color)
    Parameters
    Type Name Description
    System.Drawing.Color color

    WriteLine()

    Writes a line terminator to the text stream.

    Declaration
    public override void WriteLine()
    Overrides
    System.IO.TextWriter.WriteLine()

    WriteLine(Boolean)

    Writes the text representation of a Boolean followed by a line terminator to the text stream.

    Declaration
    public override void WriteLine(bool value)
    Parameters
    Type Name Description
    System.Boolean value

    The Boolean to write.

    Overrides
    System.IO.TextWriter.WriteLine(System.Boolean)

    WriteLine(Char)

    Writes a character followed by a line terminator to the text stream.

    Declaration
    public override void WriteLine(char value)
    Parameters
    Type Name Description
    System.Char value

    The character to write to the text stream.

    Overrides
    System.IO.TextWriter.WriteLine(System.Char)

    WriteLine(Char[])

    Writes an array of characters followed by a line terminator to the text stream.

    Declaration
    public override void WriteLine(char[] buffer)
    Parameters
    Type Name Description
    System.Char[] buffer

    The character array from which data is read.

    Overrides
    System.IO.TextWriter.WriteLine(System.Char[])

    WriteLine(Char[], Int32, Int32)

    Writes a subarray of characters followed by a line terminator to the text stream.

    Declaration
    public override void WriteLine(char[] buffer, int index, int count)
    Parameters
    Type Name Description
    System.Char[] buffer

    The character array from which data is read.

    System.Int32 index

    The index into buffer at which to begin reading.

    System.Int32 count

    The maximum number of characters to write.

    Overrides
    System.IO.TextWriter.WriteLine(System.Char[], System.Int32, System.Int32)

    WriteLine(Double)

    Writes the text representation of a 8-byte floating-point value followed by a line terminator to the text stream.

    Declaration
    public override void WriteLine(double value)
    Parameters
    Type Name Description
    System.Double value

    The 8-byte floating-point value to write.

    Overrides
    System.IO.TextWriter.WriteLine(System.Double)

    WriteLine(Int32)

    Writes the text representation of a 4-byte signed integer followed by a line terminator to the text stream.

    Declaration
    public override void WriteLine(int value)
    Parameters
    Type Name Description
    System.Int32 value

    The 4-byte signed integer to write.

    Overrides
    System.IO.TextWriter.WriteLine(System.Int32)

    WriteLine(Int64)

    Writes the text representation of an 8-byte signed integer followed by a line terminator to the text stream.

    Declaration
    public override void WriteLine(long value)
    Parameters
    Type Name Description
    System.Int64 value

    The 8-byte signed integer to write.

    Overrides
    System.IO.TextWriter.WriteLine(System.Int64)

    WriteLine(Object)

    Writes the text representation of an object by calling ToString on this object, followed by a line terminator to the text stream.

    Declaration
    public override void WriteLine(object value)
    Parameters
    Type Name Description
    System.Object value

    The object to write.

    Overrides
    System.IO.TextWriter.WriteLine(System.Object)

    WriteLine(Single)

    Writes the text representation of a 4-byte floating-point value followed by a line terminator to the text stream.

    Declaration
    public override void WriteLine(float value)
    Parameters
    Type Name Description
    System.Single value

    The 4-byte floating-point value to write.

    Overrides
    System.IO.TextWriter.WriteLine(System.Single)

    WriteLine(String)

    Writes a string followed by a line terminator to the text stream.

    Declaration
    public override void WriteLine(string s)
    Parameters
    Type Name Description
    System.String s

    The string to write.

    Overrides
    System.IO.TextWriter.WriteLine(System.String)

    WriteLine(String, Object)

    Writes out a formatted string and a new line, using the same semantics as Format.

    Declaration
    public override void WriteLine(string format, object arg0)
    Parameters
    Type Name Description
    System.String format

    The formatted string.

    System.Object arg0

    The object to write into the formatted string.

    Overrides
    System.IO.TextWriter.WriteLine(System.String, System.Object)

    WriteLine(String, Object, Object)

    Writes out a formatted string and a new line, using the same semantics as Format.

    Declaration
    public override void WriteLine(string format, object arg0, object arg1)
    Parameters
    Type Name Description
    System.String format

    The formatting string.

    System.Object arg0

    The object to write into the format string.

    System.Object arg1

    The object to write into the format string.

    Overrides
    System.IO.TextWriter.WriteLine(System.String, System.Object, System.Object)

    WriteLine(String, Object[])

    Writes out a formatted string and a new line, using the same semantics as Format.

    Declaration
    public override void WriteLine(string format, params object[] arg)
    Parameters
    Type Name Description
    System.String format

    The formatting string.

    System.Object[] arg

    The object array to write into format string.

    Overrides
    System.IO.TextWriter.WriteLine(System.String, System.Object[])

    WriteLine(UInt32)

    Writes the text representation of a 4-byte unsigned integer followed by a line terminator to the text stream.

    Declaration
    [CLSCompliant(false)]
    public override void WriteLine(uint value)
    Parameters
    Type Name Description
    System.UInt32 value

    The 4-byte unsigned integer to write.

    Overrides
    System.IO.TextWriter.WriteLine(System.UInt32)

    WriteLineNoTabs(String)

    Declaration
    public void WriteLineNoTabs(string s)
    Parameters
    Type Name Description
    System.String s

    WriteStrikeThrough(StrikeThroughStyle)

    Declaration
    public void WriteStrikeThrough(StrikeThroughStyle style)
    Parameters
    Type Name Description
    StrikeThroughStyle style

    WriteSubSuperScript(FontImpl)

    Declaration
    public void WriteSubSuperScript(FontImpl font)
    Parameters
    Type Name Description
    FontImpl font

    WriteTag(RtfTags)

    Declaration
    public void WriteTag(RtfTags tag)
    Parameters
    Type Name Description
    RtfTags tag

    WriteTag(RtfTags, Object[])

    Declaration
    public void WriteTag(RtfTags tag, params object[] arrParams)
    Parameters
    Type Name Description
    RtfTags tag
    System.Object[] arrParams

    WriteText(IFont, String)

    Declaration
    public void WriteText(IFont font, string strText)
    Parameters
    Type Name Description
    IFont font
    System.String strText

    WriteText(Font, Color, Color, String)

    Declaration
    public void WriteText(Font font, Color foreColor, Color backColor, string strText)
    Parameters
    Type Name Description
    System.Drawing.Font font
    System.Drawing.Color foreColor
    System.Drawing.Color backColor
    System.String strText

    WriteText(Font, Color, String)

    Declaration
    public void WriteText(Font font, Color foreColor, string strText)
    Parameters
    Type Name Description
    System.Drawing.Font font
    System.Drawing.Color foreColor
    System.String strText

    WriteText(Font, String)

    Declaration
    public void WriteText(Font font, string strText)
    Parameters
    Type Name Description
    System.Drawing.Font font
    System.String strText

    WriteUnderline(FontImpl)

    Declaration
    public void WriteUnderline(FontImpl font)
    Parameters
    Type Name Description
    FontImpl font

    WriteUnderlineAttribute()

    Declaration
    public void WriteUnderlineAttribute()

    WriteUnderlineAttribute(UnderlineStyle)

    Declaration
    public void WriteUnderlineAttribute(UnderlineStyle style)
    Parameters
    Type Name Description
    UnderlineStyle style

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved