# RtfGeneratedText

Dynamic text generated by an RTF reader or renderer, such as page number or current date.

Class 

`OfficeIMO.Rtf`

**Namespace**

`OfficeIMO.Rtf`

**Assembly**

`OfficeIMO.Rtf`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[RtfGeneratedText.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfGeneratedText.cs#L8)

**Implements**

`IRtfCloneable` `IRtfInline`

**Modifiers**

sealed

Dynamic text generated by an RTF reader or renderer, such as page number or current date.

## Inheritance

- object
- RtfGeneratedText

## Usage

Explore 8 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 8

- Method [RtfParagraph.AddCurrentDate](/api/rtf/officeimo-rtf-rtfparagraph/#method-addcurrentdate-string)
- Method [RtfParagraph.AddCurrentDateAbbreviated](/api/rtf/officeimo-rtf-rtfparagraph/#method-addcurrentdateabbreviated-string)
- Method [RtfParagraph.AddCurrentDateLong](/api/rtf/officeimo-rtf-rtfparagraph/#method-addcurrentdatelong-string)
- Method [RtfParagraph.AddCurrentTime](/api/rtf/officeimo-rtf-rtfparagraph/#method-addcurrenttime-string)
- Method [RtfParagraph.AddGeneratedText](/api/rtf/officeimo-rtf-rtfparagraph/#method-addgeneratedtext-officeimo-rtf-rtfgeneratedtextkind-string)
- Method [RtfParagraph.AddNoteReference](/api/rtf/officeimo-rtf-rtfparagraph/#method-addnotereference-officeimo-rtf-rtfnote-string)
- Method [RtfParagraph.AddPageNumber](/api/rtf/officeimo-rtf-rtfparagraph/#method-addpagenumber-string)
- Method [RtfParagraph.AddSectionNumber](/api/rtf/officeimo-rtf-rtfparagraph/#method-addsectionnumber-string)

Filter members 

Show inherited

## Constructors

`public RtfGeneratedText(RtfGeneratedTextKind kind, string? fallbackText = null)` [#](#constructor-ctor-officeimo-rtf-rtfgeneratedtextkind-string)

[RtfGeneratedText.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfGeneratedText.cs#L8)

Creates a generated text marker.

Parameters

**kind OfficeIMO.Rtf.RtfGeneratedTextKind required**

**fallbackText string? = null optional**

## Methods

`public string ToPlainText()` [#](#method-toplaintext)

[RtfGeneratedText.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfGeneratedText.cs#L24)

Returns the optional fallback text, or an empty string when the value must be generated by a renderer.

Returns

`string`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public RtfGeneratedTextKind Kind { get; set; }` [#](#property-kind)

[RtfGeneratedText.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfGeneratedText.cs#L14)

Kind of generated text represented by this marker.

`public string? FallbackText { get; set; }` [#](#property-fallbacktext)

[RtfGeneratedText.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfGeneratedText.cs#L17)

Optional text used by semantic conversions that cannot evaluate the generated value.

`public RtfNote? Note { get; set; }` [#](#property-note)

[RtfGeneratedText.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfGeneratedText.cs#L20)

Optional note attached to this generated marker, such as an automatic footnote reference.

<!-- PowerForge markdown artifact sha256:C17C13072665E5652373BB664E7B59FEA7C626F874E5B9CB70D50B51023DDD07 -->
