Table of Contents

Class RtfElement

Namespace
iTextSharp.text.rtf
Assembly
iTextSharp.LGPLv2.Core.dll

RtfElement is the base class for all RTF Element classes Version: $Id: RtfElement.cs,v 1.5 2008/05/16 19:30:14 psoares33 Exp $ @author Mark Hall (Mark.Hall@mail.room3b.eu)

public abstract class RtfElement : IRtfBasicElement, IRtfElementInterface
Inheritance
RtfElement
Implements
Derived
Inherited Members

Constructors

RtfElement(RtfDocument)

Constructs a RtfElement belonging to the specified RtfDocument.

protected RtfElement(RtfDocument doc)

Parameters

doc RtfDocument

The RtfDocument this RtfElement belongs to

Fields

CloseGroup

Constant for the end of an rtf group

public static readonly byte[] CloseGroup

Field Value

byte[]

CommaDelimiter

Constant for a comma delimiter in rtf

public static readonly byte[] CommaDelimiter

Field Value

byte[]

Delimiter

Constant for a delimiter in rtf

public static readonly byte[] Delimiter

Field Value

byte[]

Document

The RtfDocument this RtfElement belongs to

protected RtfDocument Document

Field Value

RtfDocument

InHeader

Whether this RtfElement is in a header

protected bool InHeader

Field Value

bool

InTable

Whether this RtfElement is in a table

public bool InTable

Field Value

bool

OpenGroup

Constant for the beginning of a rtf group

public static readonly byte[] OpenGroup

Field Value

byte[]

TWIPS_FACTOR

The factor to use for translating from iText to rtf measurments

public const double TWIPS_FACTOR = 20

Field Value

double

Methods

IntToByteArray(int)

Transforms an integer into its String representation and then returns the bytes of that string.

public static byte[] IntToByteArray(int i)

Parameters

i int

The integer to convert

Returns

byte[]

A byte array representing the integer

IsInTable()

Gets whether this RtfElement is in a table

public virtual bool IsInTable()

Returns

bool

Whether this RtfElement is in a table

SetInHeader(bool)

Sets whether this RtfElement is in a header

public virtual void SetInHeader(bool inHeader)

Parameters

inHeader bool

True if this RtfElement is in a header, false otherwise

SetInTable(bool)

Sets whether this RtfElement is in a table

public virtual void SetInTable(bool inTable)

Parameters

inTable bool

True if this RtfElement is in a table, false otherwise

SetRtfDocument(RtfDocument)

Sets the RtfDocument this RtfElement belongs to

public virtual void SetRtfDocument(RtfDocument doc)

Parameters

doc RtfDocument

The RtfDocument to use

WriteContent(Stream)

Writes the element content to the given output stream.

public abstract void WriteContent(Stream outp)

Parameters

outp Stream