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
| Name | Type | Access | Description |
|---|---|---|---|
PaperSize | PaperSizeType | Read/Write | Gets or sets the paper size. |
Orientation | PageOrientationType | Read/Write | Gets or sets the orientation. |
FirstPageNumber | int? | Read/Write | Gets or sets the first page number. |
Scale | int? | Read/Write | Gets or sets the scale. |
FitToPagesWide | int? | Read/Write | Gets or sets the fit to pages wide. |
FitToPagesTall | int? | Read/Write | Gets or sets the fit to pages tall. |
PrintArea | string | Read/Write | Gets or sets the print area. |
PrintTitleRows | string | Read/Write | Gets or sets the print title rows. |
PrintTitleColumns | string | Read/Write | Gets or sets the print title columns. |
LeftMargin | double | Read/Write | Gets or sets the left margin. |
RightMargin | double | Read/Write | Gets or sets the right margin. |
TopMargin | double | Read/Write | Gets or sets the top margin. |
BottomMargin | double | Read/Write | Gets or sets the bottom margin. |
HeaderMargin | double | Read/Write | Gets or sets the header margin. |
FooterMargin | double | Read/Write | Gets or sets the footer margin. |
LeftMarginInch | double | Read/Write | Gets or sets the left margin inch. |
RightMarginInch | double | Read/Write | Gets or sets the right margin inch. |
TopMarginInch | double | Read/Write | Gets or sets the top margin inch. |
BottomMarginInch | double | Read/Write | Gets or sets the bottom margin inch. |
HeaderMarginInch | double | Read/Write | Gets or sets the header margin inch. |
FooterMarginInch | double | Read/Write | Gets or sets the footer margin inch. |
LeftHeader | string | Read/Write | Gets or sets the left header. |
CenterHeader | string | Read/Write | Gets or sets the center header. |
RightHeader | string | Read/Write | Gets or sets the right header. |
LeftFooter | string | Read/Write | Gets or sets the left footer. |
CenterFooter | string | Read/Write | Gets or sets the center footer. |
RightFooter | string | Read/Write | Gets or sets the right footer. |
PrintGridlines | bool | Read/Write | Gets or sets the print gridlines. |
PrintHeadings | bool | Read/Write | Gets or sets the print headings. |
CenterHorizontally | bool | Read/Write | Gets or sets the center horizontally. |
CenterVertically | bool | Read/Write | Gets or sets the center vertically. |
HorizontalPageBreaks | IReadOnlyList<int> | Read | Gets the horizontal page breaks. |
VerticalPageBreaks | IReadOnlyList<int> | Read | Gets the vertical page breaks. |
Methods
| Signature | Description |
|---|---|
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. |