# RtfDocument

Semantic Rich Text Format document model.

Class 

`OfficeIMO.Rtf`

**Namespace**

`OfficeIMO.Rtf`

**Assembly**

`OfficeIMO.Rtf`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[RtfDocument.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L45)

**Implements**

`IRtfCloneable` `IDisposable`

**Modifiers**

sealed

Semantic Rich Text Format document model.

## Inheritance

- object
- RtfDocument

## Usage

Explore 16 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 13

- Method [RtfDocument.AddRevisionSaveId](/api/rtf/officeimo-rtf-rtfdocument/#method-addrevisionsaveid-int32)
- Method [RtfDocument.ApplyTheme](/api/rtf/officeimo-rtf-rtfdocument/#method-applytheme-officeimo-officetheme)
- Method [RtfDocument.Clone](/api/rtf/officeimo-rtf-rtfdocument/#method-clone)
- Method [RtfDocument.Create](/api/rtf/officeimo-rtf-rtfdocument/#method-create)
- Method [RtfDocument.Load](/api/rtf/officeimo-rtf-rtfdocument/#method-load-string-officeimo-rtf-rtfloadoptions-text-encoding-threading-cancellationtoken)
- Method [RtfDocument.LoadAsync](/api/rtf/officeimo-rtf-rtfdocument/#method-loadasync-string-officeimo-rtf-rtfloadoptions-text-encoding-threading-cancellationtoken)
- Method [RtfDocument.Parse](/api/rtf/officeimo-rtf-rtfdocument/#method-parse-string-officeimo-rtf-rtfloadoptions-threading-cancellationtoken)
- Method [RtfDocument.SetRevisionRootSaveId](/api/rtf/officeimo-rtf-rtfdocument/#method-setrevisionrootsaveid-nullable-system-int32)
- Property [RtfDocumentMergeResult.Document](/api/rtf/officeimo-rtf-rtfdocumentmergeresult/#property-document)
- Property [RtfDocumentMergeResult.Value](/api/rtf/officeimo-rtf-rtfdocumentmergeresult/#property-value)
- Method [RtfReadResult.RequireValue](/api/rtf/officeimo-rtf-rtfreadresult/#method-requirevalue)
- Property [RtfReadResult.Document](/api/rtf/officeimo-rtf-rtfreadresult/#property-document)
- Property [RtfReadResult.Value](/api/rtf/officeimo-rtf-rtfreadresult/#property-value)

### Accepted by parameters 3

- Method [RtfDocument.AppendDocument](/api/rtf/officeimo-rtf-rtfdocument/#method-appenddocument-officeimo-rtf-rtfdocument) parameter `source`
- Method [RtfDocumentMergeResult.Deconstruct](/api/rtf/officeimo-rtf-rtfdocumentmergeresult/#method-deconstruct-rtfdocument-officeconversionreport) parameter `value`
- Constructor [RtfListNumbering.RtfListNumbering](/api/rtf/officeimo-rtf-rtflistnumbering/#constructor-ctor-officeimo-rtf-rtfdocument) parameter `document`

Filter members 

Show inherited

## Methods

`public void AddBlock(IRtfBlock block)` [#](#method-addblock-officeimo-rtf-irtfblock)

[RtfDocument.Editing.cs:9](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.Editing.cs#L9)

Adds an existing semantic block at the end of the document.

Parameters

**block OfficeIMO.Rtf.IRtfBlock required**

`public int AddColor(byte red, byte green, byte blue)` [#](#method-addcolor-byte-byte-byte)

[RtfDocument.cs:324](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L324)

Adds a color to the color table and returns its RTF color index.

Parameters

**red byte required**

**green byte required**

**blue byte required**

Returns

`int`

`public RtfDocumentVariable AddDocumentVariable(string name, string value)` [#](#method-adddocumentvariable-string-string)

[RtfDocument.cs:357](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L357)

Adds a document variable.

Parameters

**name string required**

**value string required**

Returns

`RtfDocumentVariable`

`public RtfFileReference AddFileReference(string path, RtfFileSource sources = Ntfs)` [#](#method-addfilereference-string-officeimo-rtf-rtffilesource)

[RtfDocument.cs:384](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L384)

Adds a file table reference and returns it.

Parameters

**path string required**

**sources OfficeIMO.Rtf.RtfFileSource = Ntfs optional**

Returns

`RtfFileReference`

`public int AddFont(string name)` [#](#method-addfont-string)

[RtfDocument.cs:313](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L313)

Adds a font to the font table or returns the existing id.

Parameters

**name string required**

Returns

`int`

`public RtfHeaderFooter AddFooter(RtfHeaderFooterKind kind = Footer)` [#](#method-addfooter-officeimo-rtf-rtfheaderfooterkind)

[RtfDocument.cs:271](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L271)

Adds a footer destination.

Parameters

**kind OfficeIMO.Rtf.RtfHeaderFooterKind = Footer optional**

Returns

`RtfHeaderFooter`

`public RtfHeaderFooter AddHeader(RtfHeaderFooterKind kind = Header)` [#](#method-addheader-officeimo-rtf-rtfheaderfooterkind)

[RtfDocument.cs:261](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L261)

Adds a header destination.

Parameters

**kind OfficeIMO.Rtf.RtfHeaderFooterKind = Header optional**

Returns

`RtfHeaderFooter`

`public RtfHeaderFooter AddHeaderFooter(RtfHeaderFooterKind kind)` [#](#method-addheaderfooter-officeimo-rtf-rtfheaderfooterkind)

[RtfDocument.cs:253](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L253)

Adds a header or footer destination.

Parameters

**kind OfficeIMO.Rtf.RtfHeaderFooterKind required**

Returns

`RtfHeaderFooter`

`public RtfImage AddImage(RtfImageFormat format, byte[] data)` [#](#method-addimage-officeimo-rtf-rtfimageformat-byte)

[RtfDocument.cs:232](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L232)

Adds a picture block to the document.

Parameters

**format OfficeIMO.Rtf.RtfImageFormat required**

**data byte[] required**

Returns

`RtfImage`

`public RtfListDefinition AddListDefinition(int id, string? name = null)` [#](#method-addlistdefinition-int32-string)

[RtfDocument.cs:288](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L288)

Adds or returns a list definition.

Parameters

**id int required**

**name string? = null optional**

Returns

`RtfListDefinition`

`public RtfListOverride AddListOverride(int id, int listId)` [#](#method-addlistoverride-int32-int32)

[RtfDocument.cs:303](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L303)

Adds or returns a list override.

Parameters

**id int required**

**listId int required**

Returns

`RtfListOverride`

`public RtfNote AddNote(RtfNoteKind kind)` [#](#method-addnote-officeimo-rtf-rtfnotekind)

[RtfDocument.cs:281](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L281)

Adds a detached footnote or annotation.

Parameters

**kind OfficeIMO.Rtf.RtfNoteKind required**

Returns

`RtfNote`

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

[RtfDocument.cs:239](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L239)

Adds an embedded or linked object block to the document.

Parameters

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

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

Returns

`RtfObject`

`public RtfParagraph AddParagraph(string? text = null)` [#](#method-addparagraph-string)

[RtfDocument.cs:189](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L189)

Adds a paragraph to the document.

Parameters

**text string? = null optional**

Returns

`RtfParagraph`

`public int AddRevisionAuthor(string name)` [#](#method-addrevisionauthor-string)

[RtfDocument.cs:364](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L364)

Adds a revision author and returns its zero-based table index.

Parameters

**name string required**

Returns

`int`

`public RtfDocument AddRevisionSaveId(int id)` [#](#method-addrevisionsaveid-int32)

[RtfDocument.cs:370](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L370)

Adds a revision save identifier to the document rsidtbl.

Parameters

**id int required**

Returns

`RtfDocument`

`public RtfSection AddSection(RtfSectionBreakKind breakKind = NextPage)` [#](#method-addsection-officeimo-rtf-rtfsectionbreakkind)

[RtfDocument.cs:200](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L200)

Adds a semantic section to the document.

Parameters

**breakKind OfficeIMO.Rtf.RtfSectionBreakKind = NextPage optional**

Returns

`RtfSection`

`public RtfShape AddShape()` [#](#method-addshape)

[RtfDocument.cs:246](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L246)

Adds a drawing shape block to the document.

Returns

`RtfShape`

`public RtfStyle AddStyle(int id, string name, RtfStyleKind kind = Paragraph)` [#](#method-addstyle-int32-string-officeimo-rtf-rtfstylekind)

[RtfDocument.cs:330](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L330)

Adds or replaces a stylesheet entry.

Parameters

**id int required**

**name string required**

**kind OfficeIMO.Rtf.RtfStyleKind = Paragraph optional**

Returns

`RtfStyle`

`public RtfTable AddTable(int rows, int columns)` [#](#method-addtable-int32-int32)

[RtfDocument.cs:214](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L214)

Adds a table block to the document.

Parameters

**rows int required**

**columns int required**

Returns

`RtfTable`

AddUserProperty 2 overloads

`public RtfUserProperty AddUserProperty(string name, int? typeCode = null, string? staticValue = null)` [#](#method-adduserproperty-string-nullable-system-int32-string)

[RtfDocument.cs:343](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L343)

Adds a custom document property.

Parameters

**name string required**

**typeCode int? = null optional**

**staticValue string? = null optional**

Returns

`RtfUserProperty`

`public RtfUserProperty AddUserProperty(RtfUserProperty property)` [#](#method-adduserproperty-officeimo-rtf-rtfuserproperty)

[RtfDocument.cs:350](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L350)

Adds an existing custom document property.

Parameters

**property OfficeIMO.Rtf.RtfUserProperty required**

Returns

`RtfUserProperty`

`public RtfXmlNamespace AddXmlNamespace(int id, string uri)` [#](#method-addxmlnamespace-int32-string)

[RtfDocument.cs:396](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L396)

Adds an XML namespace declaration to the document namespace table.

Parameters

**id int required**

**uri string required**

Returns

`RtfXmlNamespace`

AppendDocument 2 overloads

`public RtfDocumentMergeResult AppendDocument(RtfDocument source)` [#](#method-appenddocument-officeimo-rtf-rtfdocument)

[RtfDocument.Merge.cs:9](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.Merge.cs#L9)

Appends an independent semantic clone of another document, remapping fonts, colors, styles, lists, and revision authors. Section layout and headers are omitted when content is appended into the destination's layout.

Parameters

**source OfficeIMO.Rtf.RtfDocument required**

Returns

`RtfDocumentMergeResult`

`public RtfDocumentMergeResult AppendDocument(RtfDocument source, RtfDocumentMergeOptions? options)` [#](#method-appenddocument-officeimo-rtf-rtfdocument-officeimo-rtf-rtfdocumentmergeoptions)

[RtfDocument.Merge.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.Merge.cs#L13)

Appends an independent copy with imported resources and optional source section preservation.

Parameters

**source OfficeIMO.Rtf.RtfDocument required**

**options OfficeIMO.Rtf.RtfDocumentMergeOptions? required**

Returns

`RtfDocumentMergeResult`

`public RtfDocument ApplyTheme(OfficeTheme theme)` [#](#method-applytheme-officeimo-officetheme)

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

Explicitly applies shared theme typography, paragraph spacing and table appearance to this document.

Parameters

**theme OfficeIMO.OfficeTheme required**

Returns

`RtfDocument` The current document.

`public RtfDocument Clone()` [#](#method-clone)

[RtfDocument.Editing.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.Editing.cs#L6)

Creates an independent semantic clone, retaining resources, ownership, and shared references.

Returns

`RtfDocument`

Create 2 overloads

`public static RtfDocument Create()` [#](#method-create)

[RtfDocument.cs:123](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L123)

Creates an empty RTF document.

Returns

`RtfDocument`

`public static RtfDocument Create(string path)` [#](#method-create-string)

[RtfDocument.Lifecycle.cs:9](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.Lifecycle.cs#L9)

Creates an empty document associated with a path, without writing it.

Parameters

**path string required**

Returns

`RtfDocument`

`public void Dispose()` [#](#method-dispose)

[RtfDocument.Lifecycle.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.Lifecycle.cs#L27)

Releases the document without saving. The in-memory model owns no external resources.

`public RtfColor? GetColor(int colorIndex)` [#](#method-getcolor-int32)

[RtfDocument.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L45)

Resolves an authored RTF color index. Automatic and missing colors return null.

Parameters

**colorIndex int required**

Returns

`RtfColor?`

`public IReadOnlyList<RtfHeaderFooter> GetEffectiveHeaderFooters(RtfSection section)` [#](#method-geteffectiveheaderfooters-officeimo-rtf-rtfsection)

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

Returns the effective headers and footers for a section, including inherited kinds.

Parameters

**section OfficeIMO.Rtf.RtfSection required**

Returns

`IReadOnlyList<RtfHeaderFooter>`

`public RtfPageSetup GetEffectivePageSetup(RtfSection section)` [#](#method-geteffectivepagesetup-officeimo-rtf-rtfsection)

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

Returns an independent page setup with document defaults applied beneath the section's authored values.

Parameters

**section OfficeIMO.Rtf.RtfSection required**

Returns

`RtfPageSetup`

`public void InsertBlock(int index, IRtfBlock block)` [#](#method-insertblock-int32-officeimo-rtf-irtfblock)

[RtfDocument.Editing.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.Editing.cs#L13)

Inserts an existing semantic block at the specified document block index.

Parameters

**index int required**

**block OfficeIMO.Rtf.IRtfBlock required**

`public RtfImage InsertImage(int index, RtfImageFormat format, byte[] data)` [#](#method-insertimage-int32-officeimo-rtf-rtfimageformat-byte)

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

Creates and inserts an image at the specified document block index.

Parameters

**index int required**

**format OfficeIMO.Rtf.RtfImageFormat required**

**data byte[] required**

Returns

`RtfImage`

`public RtfParagraph InsertParagraph(int index, string? text = null)` [#](#method-insertparagraph-int32-string)

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

Creates and inserts a paragraph at the specified document block index.

Parameters

**index int required**

**text string? = null optional**

Returns

`RtfParagraph`

`public RtfTable InsertTable(int index, int rows, int columns)` [#](#method-inserttable-int32-int32-int32)

[RtfDocument.Editing.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.Editing.cs#L38)

Creates and inserts a table at the specified document block index.

Parameters

**index int required**

**rows int required**

**columns int required**

Returns

`RtfTable`

InspectContentSafety 2 overloads

`public static OfficeContentSafetyReport InspectContentSafety(byte[] rtf, OfficeContentSafetyOptions? options = null, RtfLoadOptions? readOptions = null)` [#](#method-inspectcontentsafety-byte-officeimo-contentsafety-officecontentsafetyoptions-officeimo-rtf-rtfloadoptions)

[RtfDocument.ContentSafety.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.ContentSafety.cs#L13)

Inspects native RTF visibility, revision, geometry, contrast, and non-primary story evidence.

Parameters

**rtf byte[] required**

**options OfficeIMO.ContentSafety.OfficeContentSafetyOptions? = null optional**

**readOptions OfficeIMO.Rtf.RtfLoadOptions? = null optional**

Returns

`OfficeContentSafetyReport`

`public static OfficeContentSafetyReport InspectContentSafety(string filePath, OfficeContentSafetyOptions? options = null, RtfLoadOptions? readOptions = null)` [#](#method-inspectcontentsafety-string-officeimo-contentsafety-officecontentsafetyoptions-officeimo-rtf-rtfloadoptions)

[RtfDocument.ContentSafety.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.ContentSafety.cs#L25)

Inspects an RTF file without treating concealment as evidence of AI authorship.

Parameters

**filePath string required**

**options OfficeIMO.ContentSafety.OfficeContentSafetyOptions? = null optional**

**readOptions OfficeIMO.Rtf.RtfLoadOptions? = null optional**

Returns

`OfficeContentSafetyReport`

`public OfficeContentSafetyReport InspectLoadedContentSafety(OfficeContentSafetyOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-inspectloadedcontentsafety-officeimo-contentsafety-officecontentsafetyoptions-threading-cancellationtoken)

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

Inspects the loaded semantic document without reparsing, saving or executing object content. Source-load limits remain the caller's responsibility.

Parameters

**options OfficeIMO.ContentSafety.OfficeContentSafetyOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`OfficeContentSafetyReport`

Load 3 overloads

`public static RtfDocument Load(string path, RtfLoadOptions? options = null, Encoding? encoding = null, CancellationToken cancellationToken = default)` [#](#method-load-string-officeimo-rtf-rtfloadoptions-text-encoding-threading-cancellationtoken)

[RtfDocument.cs:142](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L142)

Loads RTF from a file into the semantic document model.

Parameters

**path string required**

**options OfficeIMO.Rtf.RtfLoadOptions? = null optional**

**encoding System.Text.Encoding? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`RtfDocument`

`public static RtfDocument Load(byte[] bytes, RtfLoadOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-load-byte-officeimo-rtf-rtfloadoptions-threading-cancellationtoken)

[RtfDocument.cs:157](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L157)

Loads RTF bytes into the semantic document model.

Parameters

**bytes byte[] required**

**options OfficeIMO.Rtf.RtfLoadOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`RtfDocument`

`public static RtfDocument Load(Stream stream, RtfLoadOptions? options = null, Encoding? encoding = null, CancellationToken cancellationToken = default)` [#](#method-load-io-stream-officeimo-rtf-rtfloadoptions-text-encoding-threading-cancellationtoken)

[RtfDocument.cs:169](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L169)

Loads RTF from a stream into the semantic document model.

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.Rtf.RtfLoadOptions? = null optional**

**encoding System.Text.Encoding? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`RtfDocument`

LoadAsync 2 overloads

`public static async Task<RtfDocument> LoadAsync(string path, RtfLoadOptions? options = null, Encoding? encoding = null, CancellationToken cancellationToken = default)` [#](#method-loadasync-string-officeimo-rtf-rtfloadoptions-text-encoding-threading-cancellationtoken)

Asynchronously loads RTF from a file into the semantic document model.

Parameters

**path string required**

**options OfficeIMO.Rtf.RtfLoadOptions? = null optional**

**encoding System.Text.Encoding? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<RtfDocument>`

`public static async Task<RtfDocument> LoadAsync(Stream stream, RtfLoadOptions? options = null, Encoding? encoding = null, CancellationToken cancellationToken = default)` [#](#method-loadasync-io-stream-officeimo-rtf-rtfloadoptions-text-encoding-threading-cancellationtoken)

Asynchronously loads RTF from a stream into the semantic document model.

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.Rtf.RtfLoadOptions? = null optional**

**encoding System.Text.Encoding? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<RtfDocument>`

LoadResult 3 overloads

`public static RtfReadResult LoadResult(string path, RtfLoadOptions? options = null, Encoding? encoding = null, CancellationToken cancellationToken = default)` [#](#method-loadresult-string-officeimo-rtf-rtfloadoptions-text-encoding-threading-cancellationtoken)

[RtfDocument.cs:146](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L146)

Loads RTF from a file with lossless syntax and diagnostics.

Parameters

**path string required**

**options OfficeIMO.Rtf.RtfLoadOptions? = null optional**

**encoding System.Text.Encoding? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`RtfReadResult`

`public static RtfReadResult LoadResult(byte[] bytes, RtfLoadOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-loadresult-byte-officeimo-rtf-rtfloadoptions-threading-cancellationtoken)

[RtfDocument.cs:161](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L161)

Loads RTF from source bytes using the byte-preserving lossless representation.

Parameters

**bytes byte[] required**

**options OfficeIMO.Rtf.RtfLoadOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`RtfReadResult`

`public static RtfReadResult LoadResult(Stream stream, RtfLoadOptions? options = null, Encoding? encoding = null, CancellationToken cancellationToken = default)` [#](#method-loadresult-io-stream-officeimo-rtf-rtfloadoptions-text-encoding-threading-cancellationtoken)

[RtfDocument.cs:173](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L173)

Loads RTF from a stream with lossless syntax and diagnostics.

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.Rtf.RtfLoadOptions? = null optional**

**encoding System.Text.Encoding? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`RtfReadResult`

LoadResultAsync 2 overloads

`public static async Task<RtfReadResult> LoadResultAsync(string path, RtfLoadOptions? options = null, Encoding? encoding = null, CancellationToken cancellationToken = default)` [#](#method-loadresultasync-string-officeimo-rtf-rtfloadoptions-text-encoding-threading-cancellationtoken)

Asynchronously loads RTF from a file with lossless syntax and diagnostics.

Parameters

**path string required**

**options OfficeIMO.Rtf.RtfLoadOptions? = null optional**

**encoding System.Text.Encoding? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<RtfReadResult>`

`public static async Task<RtfReadResult> LoadResultAsync(Stream stream, RtfLoadOptions? options = null, Encoding? encoding = null, CancellationToken cancellationToken = default)` [#](#method-loadresultasync-io-stream-officeimo-rtf-rtfloadoptions-text-encoding-threading-cancellationtoken)

Asynchronously loads RTF from a stream with lossless syntax and diagnostics.

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.Rtf.RtfLoadOptions? = null optional**

**encoding System.Text.Encoding? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<RtfReadResult>`

`public void MoveBlock(int fromIndex, int toIndex)` [#](#method-moveblock-int32-int32)

[RtfDocument.Editing.cs:79](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.Editing.cs#L79)

Moves a document block to its final zero-based index.

Parameters

**fromIndex int required**

**toIndex int required**

`public static RtfDocument Parse(string rtf, RtfLoadOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-parse-string-officeimo-rtf-rtfloadoptions-threading-cancellationtoken)

[RtfDocument.cs:130](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L130)

Parses RTF text into the semantic document model.

Parameters

**rtf string required**

**options OfficeIMO.Rtf.RtfLoadOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`RtfDocument`

`public static RtfReadResult ParseResult(string rtf, RtfLoadOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-parseresult-string-officeimo-rtf-rtfloadoptions-threading-cancellationtoken)

[RtfDocument.cs:134](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L134)

Parses RTF text and returns the semantic document, lossless syntax, and diagnostics.

Parameters

**rtf string required**

**options OfficeIMO.Rtf.RtfLoadOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`RtfReadResult`

`public bool RemoveBlock(IRtfBlock block)` [#](#method-removeblock-officeimo-rtf-irtfblock)

[RtfDocument.Editing.cs:70](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.Editing.cs#L70)

Removes a block when it belongs to this document.

Parameters

**block OfficeIMO.Rtf.IRtfBlock required**

Returns

`bool`

`public IRtfBlock RemoveBlockAt(int index)` [#](#method-removeblockat-int32)

[RtfDocument.Editing.cs:59](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.Editing.cs#L59)

Removes and returns the block at the specified index.

Parameters

**index int required**

Returns

`IRtfBlock`

RemoveSelectedContent 2 overloads

`public static OfficeContentCleanupResult RemoveSelectedContent(byte[] rtf, OfficeContentCleanupSelection selection, OfficeContentCleanupOptions? options = null, RtfLoadOptions? readOptions = null, RtfSaveOptions? writeOptions = null)` [#](#method-removeselectedcontent-byte-officeimo-contentsafety-officecontentcleanupselection-officeimo-contentsafety-officecontentcleanupoptions-officeimo-rtf-rtfloadoptions-officeimo-rtf-rtfsaveoptions)

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

Removes exact selected RTF run payloads and verifies the normalized rewritten artifact.

Parameters

**rtf byte[] required**

**selection OfficeIMO.ContentSafety.OfficeContentCleanupSelection required**

**options OfficeIMO.ContentSafety.OfficeContentCleanupOptions? = null optional**

**readOptions OfficeIMO.Rtf.RtfLoadOptions? = null optional**

**writeOptions OfficeIMO.Rtf.RtfSaveOptions? = null optional**

Returns

`OfficeContentCleanupResult`

`public static OfficeContentCleanupResult RemoveSelectedContent(string inputPath, string outputPath, OfficeContentCleanupSelection selection, OfficeContentCleanupOptions? options = null, RtfLoadOptions? readOptions = null, RtfSaveOptions? writeOptions = null)` [#](#member-86e6108e027012d12ea28f24)

[RtfDocument.ContentSafety.cs:67](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.ContentSafety.cs#L67)

Atomically writes an explicitly cleaned RTF artifact.

Parameters

**inputPath string required**

**outputPath string required**

**selection OfficeIMO.ContentSafety.OfficeContentCleanupSelection required**

**options OfficeIMO.ContentSafety.OfficeContentCleanupOptions? = null optional**

**readOptions OfficeIMO.Rtf.RtfLoadOptions? = null optional**

**writeOptions OfficeIMO.Rtf.RtfSaveOptions? = null optional**

Returns

`OfficeContentCleanupResult`

`public bool ReplaceBookmarkText(string name, string replacement)` [#](#method-replacebookmarktext-string-string)

[RtfDocument.Editing.cs:104](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.Editing.cs#L104)

Replaces all inline content inside the first matching named bookmark range.

Parameters

**name string required**

**replacement string required**

Returns

`bool`

`public int ReplaceText(string oldText, string newText, StringComparison comparison = Ordinal)` [#](#method-replacetext-string-string-stringcomparison)

[RtfDocument.Editing.cs:95](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.Editing.cs#L95)

Replaces text across adjacent runs throughout the document body, headers, footers, and notes.

Parameters

**oldText string required**

**newText string required**

**comparison System.StringComparison = Ordinal optional**

Returns

`int`

`public RtfListFormatting? ResolveListFormatting(RtfParagraph paragraph)` [#](#method-resolvelistformatting-officeimo-rtf-rtfparagraph)

[RtfDocument.ListFormatting.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.ListFormatting.cs#L6)

Resolves the list instance, definition and targeted level beneath a paragraph. The returned level is an independent copy.

Parameters

**paragraph OfficeIMO.Rtf.RtfParagraph required**

Returns

`RtfListFormatting?`

`public RtfParagraph ResolveParagraphFormatting(RtfParagraph paragraph)` [#](#method-resolveparagraphformatting-officeimo-rtf-rtfparagraph)

[RtfDocument.Formatting.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.Formatting.cs#L7)

Returns an independent paragraph copy with inherited paragraph formatting applied. Missing bases and cycles stop the style chain at the last reachable entry.

Parameters

**paragraph OfficeIMO.Rtf.RtfParagraph required**

Returns

`RtfParagraph`

`public RtfRun ResolveRunFormatting(RtfParagraph paragraph, RtfRun run)` [#](#method-resolverunformatting-officeimo-rtf-rtfparagraph-officeimo-rtf-rtfrun)

[RtfDocument.Formatting.cs:94](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.Formatting.cs#L94)

Returns an independent run copy with paragraph and character styles applied beneath direct formatting.

Parameters

**paragraph OfficeIMO.Rtf.RtfParagraph required**

**run OfficeIMO.Rtf.RtfRun required**

Returns

`RtfRun`

Save 3 overloads

`public void Save(string path, RtfSaveOptions? options = null, Encoding? encoding = null)` [#](#method-save-string-officeimo-rtf-rtfsaveoptions-text-encoding)

[RtfDocument.cs:424](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L424)

Saves the document to an RTF file.

Parameters

**path string required**

**options OfficeIMO.Rtf.RtfSaveOptions? = null optional**

**encoding System.Text.Encoding? = null optional**

`public void Save(Stream stream, RtfSaveOptions? options = null, Encoding? encoding = null)` [#](#method-save-io-stream-officeimo-rtf-rtfsaveoptions-text-encoding)

[RtfDocument.cs:432](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L432)

Saves the document to an RTF stream without closing the stream.

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.Rtf.RtfSaveOptions? = null optional**

**encoding System.Text.Encoding? = null optional**

`public void Save(RtfSaveOptions? options = null, Encoding? encoding = null)` [#](#method-save-officeimo-rtf-rtfsaveoptions-text-encoding)

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

Saves to the associated path. In-memory documents must first supply a file destination.

Parameters

**options OfficeIMO.Rtf.RtfSaveOptions? = null optional**

**encoding System.Text.Encoding? = null optional**

SaveAsync 3 overloads

`public async Task SaveAsync(string path, RtfSaveOptions? options = null, Encoding? encoding = null, CancellationToken cancellationToken = default)` [#](#method-saveasync-string-officeimo-rtf-rtfsaveoptions-text-encoding-threading-cancellationtoken)

Saves the document to an RTF file.

Parameters

**path string required**

**options OfficeIMO.Rtf.RtfSaveOptions? = null optional**

**encoding System.Text.Encoding? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task`

`public async Task SaveAsync(Stream stream, RtfSaveOptions? options = null, Encoding? encoding = null, CancellationToken cancellationToken = default)` [#](#method-saveasync-io-stream-officeimo-rtf-rtfsaveoptions-text-encoding-threading-cancellationtoken)

Saves the document to an RTF stream without closing the stream.

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.Rtf.RtfSaveOptions? = null optional**

**encoding System.Text.Encoding? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task`

`public Task SaveAsync(RtfSaveOptions? options = null, Encoding? encoding = null, CancellationToken cancellationToken = default)` [#](#method-saveasync-officeimo-rtf-rtfsaveoptions-text-encoding-threading-cancellationtoken)

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

Asynchronously saves to the associated path without changing caller-owned streams.

Parameters

**options OfficeIMO.Rtf.RtfSaveOptions? = null optional**

**encoding System.Text.Encoding? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task`

`public RtfDocument SetRevisionRootSaveId(int? id)` [#](#method-setrevisionrootsaveid-nullable-system-int32)

[RtfDocument.cs:377](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L377)

Sets the root revision save identifier represented by \rsidroot.

Parameters

**id int? required**

Returns

`RtfDocument`

`public byte[] ToBytes(RtfSaveOptions? options = null, Encoding? encoding = null)` [#](#method-tobytes-officeimo-rtf-rtfsaveoptions-text-encoding)

[RtfDocument.cs:414](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L414)

Serializes the document to encoded RTF bytes.

Parameters

**options OfficeIMO.Rtf.RtfSaveOptions? = null optional**

**encoding System.Text.Encoding? = null optional**

Returns

`byte[]`

`public string ToRtf(RtfSaveOptions? options = null)` [#](#method-tortf-officeimo-rtf-rtfsaveoptions)

[RtfDocument.cs:410](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L410)

Serializes the document to RTF.

Parameters

**options OfficeIMO.Rtf.RtfSaveOptions? = null optional**

Returns

`string`

`public RtfConversionResult<string> ToRtfResult(RtfSaveOptions? options = null)` [#](#method-tortfresult-officeimo-rtf-rtfsaveoptions)

[RtfDocument.Normalization.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.Normalization.cs#L11)

Writes normalized semantic RTF with an operation-scoped report of source content that cannot survive normalization.

Parameters

**options OfficeIMO.Rtf.RtfSaveOptions? = null optional**

Returns

`RtfConversionResult<string>`

`public MemoryStream ToStream(RtfSaveOptions? options = null, Encoding? encoding = null)` [#](#method-tostream-officeimo-rtf-rtfsaveoptions-text-encoding)

[RtfDocument.cs:419](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L419)

Serializes the document to an encoded RTF memory stream.

Parameters

**options OfficeIMO.Rtf.RtfSaveOptions? = null optional**

**encoding System.Text.Encoding? = null optional**

Returns

`MemoryStream`

## 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 IReadOnlyList<RtfParagraph> Paragraphs { get; }` [#](#property-paragraphs)

[RtfDocument.cs:32](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L32)

Paragraphs contained by the document.

`public IReadOnlyList<IRtfBlock> Blocks { get; }` [#](#property-blocks)

[RtfDocument.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L35)

Top-level document blocks in order.

`public IReadOnlyList<RtfFont> Fonts { get; }` [#](#property-fonts)

[RtfDocument.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L38)

Font table entries.

`public IReadOnlyList<RtfColor> Colors { get; }` [#](#property-colors)

[RtfDocument.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L41)

Color table entries, including interior automatic-color slots.

`public IReadOnlyList<RtfStyle> Styles { get; }` [#](#property-styles)

[RtfDocument.cs:50](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L50)

Stylesheet entries.

`public IReadOnlyList<RtfListDefinition> ListDefinitions { get; }` [#](#property-listdefinitions)

[RtfDocument.cs:53](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L53)

List table definitions.

`public IReadOnlyList<RtfListOverride> ListOverrides { get; }` [#](#property-listoverrides)

[RtfDocument.cs:56](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L56)

List override table entries.

`public IReadOnlyList<RtfHeaderFooter> HeaderFooters { get; }` [#](#property-headerfooters)

[RtfDocument.cs:59](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L59)

Document headers and footers in write order.

`public IReadOnlyList<RtfNote> Notes { get; }` [#](#property-notes)

[RtfDocument.cs:62](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L62)

Footnotes, endnotes, and annotations in read or creation order.

`public IReadOnlyList<RtfSection> Sections { get; }` [#](#property-sections)

[RtfDocument.cs:65](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L65)

Semantic sections in document order when section structure is present.

`public IReadOnlyList<RtfUserProperty> UserProperties { get; }` [#](#property-userproperties)

[RtfDocument.cs:68](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L68)

Custom document properties from the RTF user properties table.

`public IReadOnlyList<RtfDocumentVariable> DocumentVariables { get; }` [#](#property-documentvariables)

[RtfDocument.cs:71](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L71)

Document variables from RTF document variable destinations.

`public IReadOnlyList<RtfRevisionAuthor> RevisionAuthors { get; }` [#](#property-revisionauthors)

[RtfDocument.cs:74](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L74)

Revision author table entries used by run-level revision metadata.

`public IReadOnlyList<int> RevisionSaveIds { get; }` [#](#property-revisionsaveids)

[RtfDocument.cs:77](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L77)

Revision save identifiers from the RTF rsidtbl destination.

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

[RtfDocument.cs:80](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L80)

Root revision save identifier from \rsidroot.

`public IReadOnlyList<RtfFileReference> FileReferences { get; }` [#](#property-filereferences)

[RtfDocument.cs:83](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L83)

File table references from the document header.

`public IReadOnlyList<RtfXmlNamespace> XmlNamespaces { get; }` [#](#property-xmlnamespaces)

[RtfDocument.cs:86](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L86)

XML namespace declarations from the RTF xmlnstbl destination.

`public RtfDocumentInfo Properties { get; private set; }` [#](#property-properties)

[RtfDocument.cs:89](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L89)

Standard document properties stored in the RTF information group.

`public RtfPageSetup PageSetup { get; private set; }` [#](#property-pagesetup)

[RtfDocument.cs:92](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L92)

Document page size and margins.

`public RtfDocumentSettings Settings { get; private set; }` [#](#property-settings)

[RtfDocument.cs:95](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L95)

Document-level settings such as view, protection, and default tabs.

`public RtfNoteSettings NoteSettings { get; private set; }` [#](#property-notesettings)

[RtfDocument.cs:98](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L98)

Document-level footnote and endnote numbering settings.

`public RtfHtmlEncapsulation? HtmlEncapsulation { get; internal set; }` [#](#property-htmlencapsulation)

[RtfDocument.cs:105](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L105)

Original Outlook/Exchange HTML encapsulation, when present.

`public bool IsHtmlEncapsulationCurrent { get; }` [#](#property-ishtmlencapsulationcurrent)

[RtfDocument.cs:114](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.cs#L114)

Whether the encapsulated HTML still corresponds to the current semantic document.

`public string? FilePath { get; private set; }` [#](#property-filepath)

[RtfDocument.Lifecycle.cs:5](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocument.Lifecycle.cs#L5)

Gets the associated destination set by path creation, loading or a successful file save.

<!-- PowerForge markdown artifact sha256:4B6A9BF4AF05455966D0C42382BF9FFF83F965B6F3D8ECBD5633C0804CEE4C88 -->
