Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

RtfReadResult

Namespace OfficeIMO.Rtf
Assembly OfficeIMO.Rtf
Implements
IOfficeResult<RtfDocument> IOfficeResult
Modifiers sealed

Result of reading RTF into syntax and semantic models.

Inheritance

  • Object
  • RtfReadResult

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.

public virtual RtfDocument RequireValue() #
Returns: RtfDocument
SaveLossless 2 overloads
public Void SaveLossless(String path) #
Returns: Void

Saves the original RTF stream to a file without semantic normalization.

Parameters

path System.String requiredposition: 0
public Void SaveLossless(Stream stream) #
Returns: Void

Saves the original RTF stream to a stream without semantic normalization.

Parameters

stream System.IO.Stream requiredposition: 0
SaveLosslessAsync 2 overloads
public Task SaveLosslessAsync(String path, CancellationToken cancellationToken = default) #
Returns: Task

Saves the original RTF stream to a file without semantic normalization.

Parameters

path System.String requiredposition: 0
cancellationToken System.Threading.CancellationToken = default optionalposition: 1
public Task SaveLosslessAsync(Stream stream, CancellationToken cancellationToken = default) #
Returns: Task

Saves the original RTF stream to a stream without semantic normalization.

Parameters

stream System.IO.Stream requiredposition: 0
cancellationToken System.Threading.CancellationToken = default optionalposition: 1
public Byte[] ToBytesLossless() #
Returns: Byte[]

Serializes the original syntax tree to source-preserving bytes without semantic normalization.

public String ToRtfLossless() #
Returns: String

Serializes the original syntax tree without semantic normalization.

public Boolean TryGetLosslessBytes(out Byte[] bytes) #
Returns: Boolean

Attempts to return source-preserving bytes without throwing for character-only input.

Parameters

bytes System.Byte[]@ requiredposition: 0

Properties

public RtfDocument Document { get; } #

Semantic document model.

public virtual RtfDocument Value { get; } #
public virtual Boolean Succeeded { get; } #
public RtfSyntaxTree SyntaxTree { get; } #

Loss-preserving syntax tree.

public IReadOnlyList<RtfDiagnostic> Diagnostics { get; } #

Combined parser and binder diagnostics.

public Boolean HasOriginalBytes { get; } #

Gets whether the read API retained the exact original source bytes.

public Boolean CanWriteLosslessBytes { get; } #

Gets whether ToBytesLossless can return bytes without character transcoding.