PageSetup

Overview

PageSetup is a class in Aspose.Cells FOSS for .NET.

Represents worksheet print and page-layout settings. var workbook = new Workbook(); var pageSetup = workbook.Worksheets[0].PageSetup; pageSetup.Orientation = PageOrientationType.Landscape; pageSetup.LeftMargin = 1.5; pageSetup.RightMargin = 1.5; pageSetup.PrintTitleRows = “$1:$1”; pageSetup.AddHorizontalPageBreak(40);

This class provides 4 methods for working with PageSetup objects in Go programs. Available methods include: AddHorizontalPageBreak, AddVerticalPageBreak, ClearHorizontalPageBreaks, ClearVerticalPageBreaks. All exported members are accessible to any Go application after adding the package via go get github.com/aspose-pdf-foss/aspose-pdf-foss-for-go. Properties: BottomMargin, BottomMarginInch, CenterFooter, CenterHeader, CenterHorizontally, CenterVertically, and 27 more.

Properties

NameTypeAccessDescription
PaperSizePaperSizeTypeRead/WriteGets or sets the paper size.
OrientationPageOrientationTypeRead/WriteGets or sets the orientation.
FirstPageNumberint?Read/WriteGets or sets the first page number.
Scaleint?Read/WriteGets or sets the scale.
FitToPagesWideint?Read/WriteGets or sets the fit to pages wide.
FitToPagesTallint?Read/WriteGets or sets the fit to pages tall.
PrintAreastringRead/WriteGets or sets the print area.
PrintTitleRowsstringRead/WriteGets or sets the print title rows.
PrintTitleColumnsstringRead/WriteGets or sets the print title columns.
LeftMargindoubleRead/WriteGets or sets the left margin.
RightMargindoubleRead/WriteGets or sets the right margin.
TopMargindoubleRead/WriteGets or sets the top margin.
BottomMargindoubleRead/WriteGets or sets the bottom margin.
HeaderMargindoubleRead/WriteGets or sets the header margin.
FooterMargindoubleRead/WriteGets or sets the footer margin.
LeftMarginInchdoubleRead/WriteGets or sets the left margin inch.
RightMarginInchdoubleRead/WriteGets or sets the right margin inch.
TopMarginInchdoubleRead/WriteGets or sets the top margin inch.
BottomMarginInchdoubleRead/WriteGets or sets the bottom margin inch.
HeaderMarginInchdoubleRead/WriteGets or sets the header margin inch.
FooterMarginInchdoubleRead/WriteGets or sets the footer margin inch.
LeftHeaderstringRead/WriteGets or sets the left header.
CenterHeaderstringRead/WriteGets or sets the center header.
RightHeaderstringRead/WriteGets or sets the right header.
LeftFooterstringRead/WriteGets or sets the left footer.
CenterFooterstringRead/WriteGets or sets the center footer.
RightFooterstringRead/WriteGets or sets the right footer.
PrintGridlinesboolRead/WriteGets or sets the print gridlines.
PrintHeadingsboolRead/WriteGets or sets the print headings.
CenterHorizontallyboolRead/WriteGets or sets the center horizontally.
CenterVerticallyboolRead/WriteGets or sets the center vertically.
HorizontalPageBreaksIReadOnlyList<int>ReadGets the horizontal page breaks.
VerticalPageBreaksIReadOnlyList<int>ReadGets the vertical page breaks.

Methods

SignatureDescription
AddHorizontalPageBreak(rowIndex: int)Adds a horizontal page break at the specified zero-based row index.
AddVerticalPageBreak(columnIndex: int)Adds a vertical page break at the specified zero-based column index.
ClearHorizontalPageBreaks()Removes all horizontal page breaks.
ClearVerticalPageBreaks()Removes all vertical page breaks.

See Also