Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

RtfSyntaxTree

Namespace OfficeIMO.Rtf.Syntax
Assembly OfficeIMO.Rtf
Modifiers sealed

Loss-preserving RTF syntax tree produced from tokens.

Inheritance

  • Object
  • RtfSyntaxTree

Usage

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

Accepted by parameters

Methods

public RtfLosslessEditor EditLossless() #
Returns: RtfLosslessEditor

Creates an editor for targeted syntax-preserving changes.

Parse 3 overloads
public static RtfSyntaxTree Parse(String rtf) #
Returns: RtfSyntaxTree

Parses RTF content into a syntax tree.

Parameters

rtf System.String requiredposition: 0
public static RtfSyntaxTree Parse(String rtf, Int32 maxDepth) #
Returns: RtfSyntaxTree

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

Parameters

rtf System.String requiredposition: 0
maxDepth System.Int32 requiredposition: 1
public static RtfSyntaxTree Parse(String rtf, RtfReadOptions options, CancellationToken cancellationToken = default) #
Returns: RtfSyntaxTree

Parses RTF content using configured resource limits and cancellation.

Parameters

rtf System.String requiredposition: 0
options OfficeIMO.Rtf.RtfReadOptions requiredposition: 1
cancellationToken System.Threading.CancellationToken = default optionalposition: 2
public String ToRtf() #
Returns: String

Serializes the original syntax tree without semantic normalization.

Properties

public RtfGroup Root { get; } #

Root RTF group.

public IReadOnlyList<RtfDiagnostic> Diagnostics { get; } #

Parser diagnostics.