Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

RtfPageSetup

OfficeIMO.Rtf

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

Page size and margin settings for an RTF document.

Inheritance

  • object
  • RtfPageSetup

Usage

Explore 11 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 RtfPageSetup() #

Methods

public RtfPageSetup SetDifferentFirstPageHeaderFooter(bool enabled = true) #

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

Parameters

enabled bool = true optional
public RtfPageSetup SetGutter(int? gutterWidthTwips = null, bool rtlGutter = false) #

Sets gutter width in twips.

Parameters

gutterWidthTwips int? = null optional
rtlGutter bool = false optional
public RtfPageSetup SetHeaderFooterDistance(int? headerDistanceTwips = null, int? footerDistanceTwips = null) #

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

Parameters

headerDistanceTwips int? = null optional
footerDistanceTwips int? = null optional
public RtfPageSetup SetLandscape(bool landscape = true) #

Sets whether landscape orientation should be emitted.

Parameters

landscape bool = true optional
public RtfPageSetup SetMargins(int? leftTwips = null, int? rightTwips = null, int? topTwips = null, int? bottomTwips = null) #

Sets document margins in twips.

Parameters

leftTwips int? = null optional
rightTwips int? = null optional
topTwips int? = null optional
bottomTwips int? = null optional
public RtfPageSetup SetPageNumbering(int? start = null, bool? restart = null, RtfPageNumberFormat? format = null, int? positionXTwips = null, int? positionYTwips = null) #

Sets page numbering controls.

Parameters

start int? = null optional
restart bool? = null optional
format OfficeIMO.Rtf.RtfPageNumberFormat? = null optional
positionXTwips int? = null optional
positionYTwips int? = null optional
public RtfPageSetup SetPaperSize(int widthTwips, int heightTwips) #

Sets paper size in twips.

Parameters

widthTwips int required
heightTwips int required
public RtfPageSetup SetPrinterPaper(int? paperSize = null, int? firstPageSource = null, int? otherPagesSource = null) #

Sets printer-specific paper metadata.

Parameters

paperSize int? = null optional
firstPageSource int? = null optional
otherPagesSource int? = null optional

Properties

public int? PaperWidthTwips { get; set; } #

Paper width in twips.

public int? PaperHeightTwips { get; set; } #

Paper height in twips.

public int? PrinterPaperSize { get; set; } #

Printer paper size code represented by \psz.

public int? FirstPagePaperSource { get; set; } #

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

public int? OtherPagesPaperSource { get; set; } #

Printer bin source for subsequent pages represented by \binsxn.

public int? MarginLeftTwips { get; set; } #

Left margin in twips.

public int? MarginRightTwips { get; set; } #

Right margin in twips.

public int? MarginTopTwips { get; set; } #

Top margin in twips.

public int? MarginBottomTwips { get; set; } #

Bottom margin in twips.

public int? GutterWidthTwips { get; set; } #

Gutter width in twips.

public int? HeaderDistanceTwips { get; set; } #

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

public int? FooterDistanceTwips { get; set; } #

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

public int? PageNumberStart { get; set; } #

Beginning page number.

public bool? PageNumberRestart { get; set; } #

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

public int? PageNumberPositionXTwips { get; set; } #

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

public int? PageNumberPositionYTwips { get; set; } #

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

public RtfPageNumberFormat? PageNumberFormat { get; set; } #

Page-number display format.

public RtfPageBorders PageBorders { get; private set; } #

Page border settings.

public bool Landscape { get; set; } #

Whether the document declares landscape orientation.

public bool? DirectLandscape { get; set; } #

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

public bool DifferentFirstPageHeaderFooter { get; set; } #

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

public bool? DirectDifferentFirstPageHeaderFooter { get; set; } #

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

public bool RtlGutter { get; set; } #

Whether the gutter should be positioned on the right side.

public bool? DirectRtlGutter { get; set; } #

Authored gutter direction. Null inherits the document setting.