Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

RtfSyntaxTree

OfficeIMO.Rtf.Syntax

Namespace
OfficeIMO.Rtf.Syntax
Assembly
OfficeIMO.Rtf
Source revision
ba882f6b0d07 with working tree changes
Modifiers
sealed

Loss-preserving RTF syntax tree produced from tokens.

Inheritance

  • object
  • RtfSyntaxTree

Usage

Explore 6 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.

Accepted by parameters 2

Methods

public RtfLosslessEditor EditLossless() #

Creates an editor for targeted syntax-preserving changes.

Parse 3 overloads
public static RtfSyntaxTree Parse(string rtf) #

Parses RTF content into a syntax tree.

Parameters

rtf string required
public static RtfSyntaxTree Parse(string rtf, int maxDepth) #

Parses RTF content into a syntax tree while limiting nested group depth.

Parameters

rtf string required
maxDepth int required
public static RtfSyntaxTree Parse(string rtf, RtfLoadOptions? options, CancellationToken cancellationToken = default) #

Parses RTF content using configured resource limits and cancellation.

Parameters

rtf string required
options OfficeIMO.Rtf.RtfLoadOptions? required
cancellationToken System.Threading.CancellationToken = default optional
public string ToRtf() #

Serializes the original syntax tree without semantic normalization.

Returns

string

Properties

public RtfGroup Root { get; } #

Root RTF group.

public IReadOnlyList<RtfDiagnostic> Diagnostics { get; } #

Parser diagnostics.