Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

RtfReadOptions

Namespace OfficeIMO.Rtf
Assembly OfficeIMO.Rtf
Modifiers sealed

Options controlling RTF parsing and semantic binding.

Inheritance

  • Object
  • RtfReadOptions

Usage

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

Accepted by parameters

Constructors

Methods

public static RtfReadOptions CreateCompatibilityProfile() #
Returns: RtfReadOptions

Creates the former permissive compatibility profile. This profile has no size or count limits, materializes embedded objects and file references, and accepts every hyperlink scheme. Use it only for trusted inputs when preserving legacy behavior is more important than bounded ingestion.

public static RtfReadOptions CreateOfficeIMOProfile() #
Returns: RtfReadOptions

Creates the bounded OfficeIMO profile used by default.

public static RtfReadOptions CreateUntrustedProfile() #
Returns: RtfReadOptions

Creates a conservative bounded profile for RTF received from an untrusted source. Embedded OLE objects and file-table references are omitted from the semantic model.

Properties

public Int32 MaxDepth { get; set; } #

Maximum nested group depth accepted by the syntax parser and semantic binder.

public Nullable<Int64> MaxInputBytes { get; set; } #

Maximum source bytes accepted by byte, file, and stream APIs.

public Nullable<Int32> MaxInputCharacters { get; set; } #

Maximum source characters accepted before tokenization.

public Nullable<Int32> MaxTokenCount { get; set; } #

Maximum number of tokenizer output tokens, including the end-of-file token.

public Nullable<Int32> MaxGroupCount { get; set; } #

Maximum number of source groups.

public Nullable<Int64> MaxTextCharacters { get; set; } #

Maximum total number of source text characters represented by text tokens.

public Nullable<Int32> MaxBinaryBytesPerPayload { get; set; } #

Maximum bytes in one \bin payload.

public Nullable<Int64> MaxTotalBinaryBytes { get; set; } #

Maximum total bytes across \bin payloads.

public Nullable<Int32> MaxImageCount { get; set; } #

Maximum number of semantic images.

public Nullable<Int32> MaxImageBytesPerImage { get; set; } #

Maximum decoded bytes in one semantic image.

public Nullable<Int64> MaxTotalImageBytes { get; set; } #

Maximum decoded bytes across semantic images.

public Nullable<Int32> MaxObjectCount { get; set; } #

Maximum number of semantic embedded or linked objects.

public Nullable<Int32> MaxObjectBytesPerObject { get; set; } #

Maximum decoded bytes in one semantic object.

public Nullable<Int64> MaxTotalObjectBytes { get; set; } #

Maximum decoded bytes across semantic objects.

public Nullable<Int32> MaxSemanticBlockCount { get; set; } #

Maximum number of semantic document blocks produced by binding.

public Boolean ReadEmbeddedObjects { get; set; } #

Whether OLE object destinations are materialized in the semantic model.

public Boolean ReadFileReferences { get; set; } #

Whether file-table destinations are materialized in the semantic model.

public RtfHyperlinkReadPolicy HyperlinkPolicy { get; set; } #

Controls hyperlink field targets materialized in the semantic model.

public Boolean WarnOnUnsupportedDestinations { get; set; } #

Whether unsupported destinations should produce warning diagnostics.

public Boolean WarnOnUnsupportedCodePages { get; set; } #

Whether unsupported ANSI code pages should produce warning diagnostics before falling back to Windows-1252.

Fields

public const Int32 DefaultMaxDepth #

Default maximum nested group depth accepted by the parser.

Value: 128
public const Int32 CompatibilityMaxDepth #

Maximum depth used by the explicit legacy compatibility profile.

Value: 512