Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

RtfDocumentSettings

OfficeIMO.Rtf

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

Document-level RTF settings that are not tied to page setup or body content.

Inheritance

  • object
  • RtfDocumentSettings

Usage

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

Constructors

public RtfDocumentSettings() #

Methods

public RtfDocumentSettings SetCharacterSet(RtfDocumentCharacterSet characterSet, int? ansiCodePage = null) #

Sets the document character set declaration and optional ANSI code page.

Parameters

characterSet OfficeIMO.Rtf.RtfDocumentCharacterSet required
ansiCodePage int? = null optional
public RtfDocumentSettings SetDefaultAlternateLanguage(int languageId) #

Sets the default alternate document language LCID.

Parameters

languageId int required
public RtfDocumentSettings SetDefaultFarEastLanguage(int languageId) #

Sets the default Far East document language LCID.

Parameters

languageId int required
public RtfDocumentSettings SetDefaultFont(int fontId) #

Sets the default font id from the document font table.

Parameters

fontId int required
public RtfDocumentSettings SetDefaultLanguage(int languageId) #

Sets the default document language LCID.

Parameters

languageId int required
public RtfDocumentSettings SetDefaultTabWidth(int twips) #

Sets the default tab width in twips.

Parameters

twips int required
public RtfDocumentSettings SetDirection(RtfTextDirection? direction) #

Sets the document default text direction.

Parameters

direction OfficeIMO.Rtf.RtfTextDirection? required
public RtfDocumentSettings SetDrawingGrid(int? horizontalSpacingTwips = null, int? verticalSpacingTwips = null, int? horizontalOriginTwips = null, int? verticalOriginTwips = null, int? horizontalShow = null, int? verticalShow = null, bool? snapToGrid = null, bool? useMargins = null) #

Sets document-level drawing grid controls.

Parameters

horizontalSpacingTwips int? = null optional
verticalSpacingTwips int? = null optional
horizontalOriginTwips int? = null optional
verticalOriginTwips int? = null optional
horizontalShow int? = null optional
verticalShow int? = null optional
snapToGrid bool? = null optional
useMargins bool? = null optional
public RtfDocumentSettings SetHyphenation(bool? automatic = null, bool? caps = null, int? consecutiveLimit = null, int? zoneTwips = null) #

Sets document-level automatic hyphenation controls.

Parameters

automatic bool? = null optional
caps bool? = null optional
consecutiveLimit int? = null optional
zoneTwips int? = null optional
public RtfDocumentSettings SetProtection(bool? forms = null, bool? revisions = null, bool? annotations = null, bool? readOnly = null) #

Sets protection-related flags.

Parameters

forms bool? = null optional
revisions bool? = null optional
annotations bool? = null optional
readOnly bool? = null optional
public RtfDocumentSettings SetRevisionTracking(bool? enabled = null, int? displayStyle = null, int? barPlacement = null) #

Sets revision-marking display controls.

Parameters

enabled bool? = null optional
displayStyle int? = null optional
barPlacement int? = null optional
public RtfDocumentSettings SetUnicodeSkipCount(int count) #

Sets the document default alternate character count after Unicode escapes (0 through 8).

Parameters

count int required
public RtfDocumentSettings SetView(int? kind = null, int? scale = null, int? zoomKind = null, int? backspaceBehavior = null) #

Sets the document view controls.

Parameters

kind int? = null optional
scale int? = null optional
zoomKind int? = null optional
backspaceBehavior int? = null optional

Properties

public RtfDocumentCharacterSet? CharacterSet { get; set; } #

Document character set declaration represented by \ansi, \mac, \pc, or \pca.

public int? AnsiCodePage { get; set; } #

ANSI code page represented by \ansicpg.

public int? UnicodeSkipCount { get; set; } #

Default alternate character count after Unicode escapes, represented by \uc.

public int? DefaultFontId { get; set; } #

Default font id represented by \deff.

public int? DefaultTabWidthTwips { get; set; } #

Default tab width in twips, represented by \deftab.

public int? DefaultLanguageId { get; set; } #

Default document language LCID represented by \deflang.

public int? DefaultFarEastLanguageId { get; set; } #

Default Far East language LCID represented by \deflangfe.

public int? DefaultAlternateLanguageId { get; set; } #

Default alternate language LCID represented by \adeflang.

public int? ViewKind { get; set; } #

View kind value represented by \viewkind.

public int? ViewScale { get; set; } #

View scale percentage represented by \viewscale.

public int? ZoomKind { get; set; } #

Zoom kind value represented by \viewzk.

public int? ViewBackspaceBehavior { get; set; } #

View backspace behavior represented by \viewbksp.

public bool? WidowOrphanControl { get; set; } #

Whether widow/orphan control is explicitly enabled or disabled.

public bool? AutoHyphenation { get; set; } #

Whether automatic hyphenation is explicitly enabled or disabled.

public bool? HyphenateCaps { get; set; } #

Whether words in all caps may be hyphenated, represented by \hyphcaps.

public int? ConsecutiveHyphenLimit { get; set; } #

Maximum number of consecutive hyphenated lines represented by \hyphconsec.

public int? HyphenationZoneTwips { get; set; } #

Hyphenation hot zone in twips represented by \hyphhotz.

public bool? FacingPages { get; set; } #

Whether facing pages are explicitly enabled or disabled.

public bool? MirrorMargins { get; set; } #

Whether mirrored margins are explicitly enabled or disabled.

public bool? FormProtection { get; set; } #

Whether form protection is explicitly enabled or disabled.

public bool? RevisionProtection { get; set; } #

Whether revision protection is explicitly enabled or disabled.

public bool? AnnotationProtection { get; set; } #

Whether annotation protection is explicitly enabled or disabled.

public bool? ReadOnlyProtection { get; set; } #

Whether read-only protection is explicitly enabled or disabled.

public bool HasEditingProtection { get; } #

Whether any RTF editing-protection flag is enabled.

public bool IsContentEncrypted { get; } #

Whether this model represents encrypted RTF content.

public bool? TrackRevisions { get; set; } #

Whether revision marking is enabled, represented by \revisions.

public int? RevisionDisplayStyle { get; set; } #

Revision text display style represented by \revprop.

public int? RevisionBarPlacement { get; set; } #

Revision bar placement represented by \revbar.

public int? DrawingGridHorizontalSpacingTwips { get; set; } #

Drawing grid horizontal spacing represented by \dghspace.

public int? DrawingGridVerticalSpacingTwips { get; set; } #

Drawing grid vertical spacing represented by \dgvspace.

public int? DrawingGridHorizontalOriginTwips { get; set; } #

Drawing grid horizontal origin represented by \dghorigin.

public int? DrawingGridVerticalOriginTwips { get; set; } #

Drawing grid vertical origin represented by \dgvorigin.

public int? DrawingGridHorizontalShow { get; set; } #

Drawing grid horizontal display frequency represented by \dghshow.

public int? DrawingGridVerticalShow { get; set; } #

Drawing grid vertical display frequency represented by \dgvshow.

public bool? SnapToDrawingGrid { get; set; } #

Whether drawing objects snap to the document grid, represented by \dgsnap.

public bool? DrawingGridUsesMargins { get; set; } #

Whether drawing grid origin uses page margins, represented by \dgmargin.

public RtfTextDirection? Direction { get; set; } #

Document default text direction represented by \ltrdoc or \rtldoc.

public RtfNoteMode? NoteMode { get; set; } #

Gets or sets the declared document note mode. Null retains the applicable parsed or authored default.