API Reference
RtfDocumentSettings
Document-level RTF settings that are not tied to page setup or body content.
Inheritance
- Object
- RtfDocumentSettings
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Property RtfDocument.Settings
- Method RtfDocumentSettings.SetCharacterSet
- Method RtfDocumentSettings.SetDefaultAlternateLanguage
- Method RtfDocumentSettings.SetDefaultFarEastLanguage
- Method RtfDocumentSettings.SetDefaultFont
- Method RtfDocumentSettings.SetDefaultLanguage
- Method RtfDocumentSettings.SetDefaultTabWidth
- Method RtfDocumentSettings.SetDirection
- Method RtfDocumentSettings.SetDrawingGrid
- Method RtfDocumentSettings.SetHyphenation
- Method RtfDocumentSettings.SetProtection
- Method RtfDocumentSettings.SetRevisionTracking
- Method RtfDocumentSettings.SetUnicodeSkipCount
- Method RtfDocumentSettings.SetView
Constructors
public RtfDocumentSettings() #Methods
public RtfDocumentSettings SetCharacterSet(RtfDocumentCharacterSet characterSet, Nullable<Int32> ansiCodePage = null) #RtfDocumentSettingsSets the document character set declaration and optional ANSI code page.
Parameters
- characterSet OfficeIMO.Rtf.RtfDocumentCharacterSet
- ansiCodePage System.Nullable{System.Int32} = null
public RtfDocumentSettings SetDefaultAlternateLanguage(Int32 languageId) #RtfDocumentSettingsSets the default alternate document language LCID.
Parameters
- languageId System.Int32
public RtfDocumentSettings SetDefaultFarEastLanguage(Int32 languageId) #RtfDocumentSettingsSets the default Far East document language LCID.
Parameters
- languageId System.Int32
public RtfDocumentSettings SetDefaultFont(Int32 fontId) #RtfDocumentSettingsSets the default font id from the document font table.
Parameters
- fontId System.Int32
public RtfDocumentSettings SetDefaultLanguage(Int32 languageId) #RtfDocumentSettingsSets the default document language LCID.
Parameters
- languageId System.Int32
public RtfDocumentSettings SetDefaultTabWidth(Int32 twips) #RtfDocumentSettingsSets the default tab width in twips.
Parameters
- twips System.Int32
public RtfDocumentSettings SetDirection(Nullable<RtfTextDirection> direction) #RtfDocumentSettingsSets the document default text direction.
Parameters
- direction System.Nullable{OfficeIMO.Rtf.RtfTextDirection}
public RtfDocumentSettings SetDrawingGrid(Nullable<Int32> horizontalSpacingTwips = null, Nullable<Int32> verticalSpacingTwips = null, Nullable<Int32> horizontalOriginTwips = null, Nullable<Int32> verticalOriginTwips = null, Nullable<Int32> horizontalShow = null, Nullable<Int32> verticalShow = null, Nullable<Boolean> snapToGrid = null, Nullable<Boolean> useMargins = null) #RtfDocumentSettingsSets document-level drawing grid controls.
Parameters
- horizontalSpacingTwips System.Nullable{System.Int32} = null
- verticalSpacingTwips System.Nullable{System.Int32} = null
- horizontalOriginTwips System.Nullable{System.Int32} = null
- verticalOriginTwips System.Nullable{System.Int32} = null
- horizontalShow System.Nullable{System.Int32} = null
- verticalShow System.Nullable{System.Int32} = null
- snapToGrid System.Nullable{System.Boolean} = null
- useMargins System.Nullable{System.Boolean} = null
public RtfDocumentSettings SetHyphenation(Nullable<Boolean> automatic = null, Nullable<Boolean> caps = null, Nullable<Int32> consecutiveLimit = null, Nullable<Int32> zoneTwips = null) #RtfDocumentSettingsSets document-level automatic hyphenation controls.
Parameters
- automatic System.Nullable{System.Boolean} = null
- caps System.Nullable{System.Boolean} = null
- consecutiveLimit System.Nullable{System.Int32} = null
- zoneTwips System.Nullable{System.Int32} = null
public RtfDocumentSettings SetProtection(Nullable<Boolean> forms = null, Nullable<Boolean> revisions = null, Nullable<Boolean> annotations = null, Nullable<Boolean> readOnly = null) #RtfDocumentSettingsSets protection-related flags.
Parameters
- forms System.Nullable{System.Boolean} = null
- revisions System.Nullable{System.Boolean} = null
- annotations System.Nullable{System.Boolean} = null
- readOnly System.Nullable{System.Boolean} = null
public RtfDocumentSettings SetRevisionTracking(Nullable<Boolean> enabled = null, Nullable<Int32> displayStyle = null, Nullable<Int32> barPlacement = null) #RtfDocumentSettingsSets revision-marking display controls.
Parameters
- enabled System.Nullable{System.Boolean} = null
- displayStyle System.Nullable{System.Int32} = null
- barPlacement System.Nullable{System.Int32} = null
public RtfDocumentSettings SetUnicodeSkipCount(Int32 count) #RtfDocumentSettingsSets the document default alternate character count after Unicode escapes.
Parameters
- count System.Int32
public RtfDocumentSettings SetView(Nullable<Int32> kind = null, Nullable<Int32> scale = null, Nullable<Int32> zoomKind = null, Nullable<Int32> backspaceBehavior = null) #RtfDocumentSettingsSets the document view controls.
Parameters
- kind System.Nullable{System.Int32} = null
- scale System.Nullable{System.Int32} = null
- zoomKind System.Nullable{System.Int32} = null
- backspaceBehavior System.Nullable{System.Int32} = null
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public Nullable<RtfDocumentCharacterSet> CharacterSet { get; set; } #Document character set declaration represented by \ansi, \mac, \pc, or \pca.
public Nullable<Int32> AnsiCodePage { get; set; } #ANSI code page represented by \ansicpg.
public Nullable<Int32> UnicodeSkipCount { get; set; } #Default alternate character count after Unicode escapes, represented by \uc.
public Nullable<Int32> DefaultFontId { get; set; } #Default font id represented by \deff.
public Nullable<Int32> DefaultTabWidthTwips { get; set; } #Default tab width in twips, represented by \deftab.
public Nullable<Int32> DefaultLanguageId { get; set; } #Default document language LCID represented by \deflang.
public Nullable<Int32> DefaultFarEastLanguageId { get; set; } #Default Far East language LCID represented by \deflangfe.
public Nullable<Int32> DefaultAlternateLanguageId { get; set; } #Default alternate language LCID represented by \adeflang.
public Nullable<Int32> ViewKind { get; set; } #View kind value represented by \viewkind.
public Nullable<Int32> ViewScale { get; set; } #View scale percentage represented by \viewscale.
public Nullable<Int32> ZoomKind { get; set; } #Zoom kind value represented by \viewzk.
public Nullable<Int32> ViewBackspaceBehavior { get; set; } #View backspace behavior represented by \viewbksp.
public Nullable<Boolean> WidowOrphanControl { get; set; } #Whether widow/orphan control is explicitly enabled or disabled.
public Nullable<Boolean> AutoHyphenation { get; set; } #Whether automatic hyphenation is explicitly enabled or disabled.
public Nullable<Boolean> HyphenateCaps { get; set; } #Whether words in all caps may be hyphenated, represented by \hyphcaps.
public Nullable<Int32> ConsecutiveHyphenLimit { get; set; } #Maximum number of consecutive hyphenated lines represented by \hyphconsec.
public Nullable<Int32> HyphenationZoneTwips { get; set; } #Hyphenation hot zone in twips represented by \hyphhotz.
public Nullable<Boolean> FacingPages { get; set; } #Whether facing pages are explicitly enabled or disabled.
public Nullable<Boolean> MirrorMargins { get; set; } #Whether mirrored margins are explicitly enabled or disabled.
public Nullable<Boolean> FormProtection { get; set; } #Whether form protection is explicitly enabled or disabled.
public Nullable<Boolean> RevisionProtection { get; set; } #Whether revision protection is explicitly enabled or disabled.
public Nullable<Boolean> AnnotationProtection { get; set; } #Whether annotation protection is explicitly enabled or disabled.
public Nullable<Boolean> ReadOnlyProtection { get; set; } #Whether read-only protection is explicitly enabled or disabled.
public Boolean HasEditingProtection { get; } #Whether any RTF editing-protection flag is enabled.
public Boolean IsContentEncrypted { get; } #Whether this model represents encrypted RTF content.
public Nullable<Boolean> TrackRevisions { get; set; } #Whether revision marking is enabled, represented by \revisions.
public Nullable<Int32> RevisionDisplayStyle { get; set; } #Revision text display style represented by \revprop.
public Nullable<Int32> RevisionBarPlacement { get; set; } #Revision bar placement represented by \revbar.
public Nullable<Int32> DrawingGridHorizontalSpacingTwips { get; set; } #Drawing grid horizontal spacing represented by \dghspace.
public Nullable<Int32> DrawingGridVerticalSpacingTwips { get; set; } #Drawing grid vertical spacing represented by \dgvspace.
public Nullable<Int32> DrawingGridHorizontalOriginTwips { get; set; } #Drawing grid horizontal origin represented by \dghorigin.
public Nullable<Int32> DrawingGridVerticalOriginTwips { get; set; } #Drawing grid vertical origin represented by \dgvorigin.
public Nullable<Int32> DrawingGridHorizontalShow { get; set; } #Drawing grid horizontal display frequency represented by \dghshow.
public Nullable<Int32> DrawingGridVerticalShow { get; set; } #Drawing grid vertical display frequency represented by \dgvshow.
public Nullable<Boolean> SnapToDrawingGrid { get; set; } #Whether drawing objects snap to the document grid, represented by \dgsnap.
public Nullable<Boolean> DrawingGridUsesMargins { get; set; } #Whether drawing grid origin uses page margins, represented by \dgmargin.
public Nullable<RtfTextDirection> Direction { get; set; } #Document default text direction represented by \ltrdoc or \rtldoc.