# RtfObject

Dependency-free representation of an RTF embedded or linked object.

Class 

`OfficeIMO.Rtf`

**Namespace**

`OfficeIMO.Rtf`

**Assembly**

`OfficeIMO.Rtf`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[RtfObject.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfObject.cs#L46)

**Implements**

`IRtfCloneable` `IRtfInline` `IRtfBlock`

**Modifiers**

sealed

Dependency-free representation of an RTF embedded or linked object.

## Inheritance

- object
- RtfObject

## Usage

Explore 2 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 2

- Method [RtfDocument.AddObject](/api/rtf/officeimo-rtf-rtfdocument/#method-addobject-officeimo-rtf-rtfobjectkind-byte)
- Method [RtfParagraph.AddObject](/api/rtf/officeimo-rtf-rtfparagraph/#method-addobject-officeimo-rtf-rtfobjectkind-byte)

Filter members 

Show inherited

## Constructors

`public RtfObject(RtfObjectKind kind = Unknown, byte[]? data = null)` [#](#constructor-ctor-officeimo-rtf-rtfobjectkind-byte)

[RtfObject.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfObject.cs#L46)

Creates an RTF object with optional raw object payload.

Parameters

**kind OfficeIMO.Rtf.RtfObjectKind = Unknown optional**

**data byte[]? = null optional**

## Methods

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

[RtfObject.cs:52](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfObject.cs#L52)

Returns the fallback result as plain text.

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 RtfObjectKind Kind { get; set; }` [#](#property-kind)

[RtfObject.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfObject.cs#L16)

Object embedding or linking kind.

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

[RtfObject.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfObject.cs#L19)

Object class text from \objclass when present.

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

[RtfObject.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfObject.cs#L22)

Object name text from \objname when present.

`public byte[] Data { get; set; }` [#](#property-data)

[RtfObject.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfObject.cs#L26)

Raw bytes from the \objdata destination.

`public long PayloadLength { get; }` [#](#property-payloadlength)

[RtfObject.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfObject.cs#L30)

Available decoded byte length without materializing a deferred source payload.

`public int? Width { get; set; }` [#](#property-width)

[RtfObject.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfObject.cs#L34)

Object source width in twips or object units when declared by \objw.

`public int? Height { get; set; }` [#](#property-height)

[RtfObject.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfObject.cs#L37)

Object source height in twips or object units when declared by \objh.

`public int? ScaleX { get; set; }` [#](#property-scalex)

[RtfObject.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfObject.cs#L40)

Horizontal scale percentage when declared by \objscalex.

`public int? ScaleY { get; set; }` [#](#property-scaley)

[RtfObject.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfObject.cs#L43)

Vertical scale percentage when declared by \objscaley.

`public RtfParagraph Result { get; private set; }` [#](#property-result)

[RtfObject.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfObject.cs#L46)

Textual/rich fallback result shown by readers that cannot activate the object.

`public RtfImage? ResultImage { get; set; }` [#](#property-resultimage)

[RtfObject.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfObject.cs#L49)

Picture fallback result when the object declares a result picture.

<!-- PowerForge markdown artifact sha256:873ADEF4CFE13E79C5FBD3EE1FCA6E7295BF1F56314A56E647AF83EFBF49BD6B -->
