Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

RtfPageSetup

Namespace OfficeIMO.Rtf
Assembly OfficeIMO.Rtf
Implements
IRtfCloneable
Modifiers sealed

Page size and margin settings for an RTF document.

Inheritance

  • Object
  • RtfPageSetup

Usage

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

Constructors

Methods

public RtfPageSetup SetDifferentFirstPageHeaderFooter(Boolean enabled = true) #
Returns: RtfPageSetup

Sets whether first-page header/footer variants should be enabled.

Parameters

enabled System.Boolean = true optionalposition: 0
public RtfPageSetup SetGutter(Nullable<Int32> gutterWidthTwips = null, Boolean rtlGutter = false) #
Returns: RtfPageSetup

Sets gutter width in twips.

Parameters

gutterWidthTwips System.Nullable{System.Int32} = null optionalposition: 0
rtlGutter System.Boolean = false optionalposition: 1
public RtfPageSetup SetHeaderFooterDistance(Nullable<Int32> headerDistanceTwips = null, Nullable<Int32> footerDistanceTwips = null) #
Returns: RtfPageSetup

Sets header and footer distances from the page edges in twips.

Parameters

headerDistanceTwips System.Nullable{System.Int32} = null optionalposition: 0
footerDistanceTwips System.Nullable{System.Int32} = null optionalposition: 1
public RtfPageSetup SetLandscape(Boolean landscape = true) #
Returns: RtfPageSetup

Sets whether landscape orientation should be emitted.

Parameters

landscape System.Boolean = true optionalposition: 0
public RtfPageSetup SetMargins(Nullable<Int32> leftTwips = null, Nullable<Int32> rightTwips = null, Nullable<Int32> topTwips = null, Nullable<Int32> bottomTwips = null) #
Returns: RtfPageSetup

Sets document margins in twips.

Parameters

leftTwips System.Nullable{System.Int32} = null optionalposition: 0
rightTwips System.Nullable{System.Int32} = null optionalposition: 1
topTwips System.Nullable{System.Int32} = null optionalposition: 2
bottomTwips System.Nullable{System.Int32} = null optionalposition: 3
public RtfPageSetup SetPageNumbering(Nullable<Int32> start = null, Nullable<Boolean> restart = null, Nullable<RtfPageNumberFormat> format = null, Nullable<Int32> positionXTwips = null, Nullable<Int32> positionYTwips = null) #
Returns: RtfPageSetup

Sets page numbering controls.

Parameters

start System.Nullable{System.Int32} = null optionalposition: 0
restart System.Nullable{System.Boolean} = null optionalposition: 1
format System.Nullable{OfficeIMO.Rtf.RtfPageNumberFormat} = null optionalposition: 2
positionXTwips System.Nullable{System.Int32} = null optionalposition: 3
positionYTwips System.Nullable{System.Int32} = null optionalposition: 4
public RtfPageSetup SetPaperSize(Int32 widthTwips, Int32 heightTwips) #
Returns: RtfPageSetup

Sets paper size in twips.

Parameters

widthTwips System.Int32 requiredposition: 0
heightTwips System.Int32 requiredposition: 1
public RtfPageSetup SetPrinterPaper(Nullable<Int32> paperSize = null, Nullable<Int32> firstPageSource = null, Nullable<Int32> otherPagesSource = null) #
Returns: RtfPageSetup

Sets printer-specific paper metadata.

Parameters

paperSize System.Nullable{System.Int32} = null optionalposition: 0
firstPageSource System.Nullable{System.Int32} = null optionalposition: 1
otherPagesSource System.Nullable{System.Int32} = null optionalposition: 2

Properties

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

Paper width in twips.

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

Paper height in twips.

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

Printer paper size code represented by \psz.

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

Printer bin source for the first page represented by \binfsxn.

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

Printer bin source for subsequent pages represented by \binsxn.

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

Left margin in twips.

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

Right margin in twips.

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

Top margin in twips.

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

Bottom margin in twips.

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

Gutter width in twips.

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

Header distance from the top edge of the page in twips.

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

Footer distance from the bottom edge of the page in twips.

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

Beginning page number.

public Nullable<Boolean> PageNumberRestart { get; set; } #

Whether page numbering restarts in this page setup. false represents continuous numbering.

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

Horizontal page-number position in twips from the right margin.

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

Vertical page-number position in twips from the top margin.

public Nullable<RtfPageNumberFormat> PageNumberFormat { get; set; } #

Page-number display format.

public RtfPageBorders PageBorders { get; set; } #

Page border settings.

public Boolean Landscape { get; set; } #

Whether the document declares landscape orientation.

public Nullable<Boolean> DirectLandscape { get; set; } #

Authored orientation. Null inherits the document's orientation; false explicitly selects portrait.

public Boolean DifferentFirstPageHeaderFooter { get; set; } #

Whether first-page header/footer variants are enabled, represented by \titlepg.

public Nullable<Boolean> DirectDifferentFirstPageHeaderFooter { get; set; } #

Authored first-page header/footer setting. Null inherits the document setting.

public Boolean RtlGutter { get; set; } #

Whether the gutter should be positioned on the right side.

public Nullable<Boolean> DirectRtlGutter { get; set; } #

Authored gutter direction. Null inherits the document setting.