PageSetup
Overview
PageSetup is a class in Aspose.Words FOSS for Java.
Inherits from: IBorderAttrSource.
Represents the page setup properties of a section.
Edition status of its 132 listed members (a property and its accessor methods are listed separately, overloads once): 132 not yet exercised by a verified example.
This class declares 87 methods for PageSetup objects in Java programs.
Available methods include: clearFormatting, getBidi, getBorderAlwaysInFront, getBorderAppliesTo, getBorderDistanceFrom, getBorderSurroundsFooter, getBorderSurroundsHeader, getBorders, getBottomMargin, getChapterPageSeparator, getCharactersPerLine, getDifferentFirstPageHeaderFooter, and 75 additional methods.
Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package.
Properties: bidi, borderAlwaysInFront, borderAppliesTo, borderDistanceFrom, borderSurroundsFooter, borderSurroundsHeader, and 39 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
oddAndEvenPagesHeaderFooter | boolean | Read/Write | True if the document has different headers and footers for odd-numbered and even-numbered pages. |
differentFirstPageHeaderFooter | boolean | Read/Write | True if a different header or footer is used on the first page. |
multiplePages | int | Read/Write | For multiple page documents, gets or sets how a document is printed or rendered so that it can be bound as a booklet. |
sheetsPerBooklet | int | Read/Write | Returns or sets the number of pages to be included in each booklet. |
sectionStart | int | Read/Write | Returns or sets the type of section break for the specified object. |
suppressEndnotes | boolean | Read/Write | True if endnotes are printed at the end of the next section that doesn’t suppress endnotes. |
verticalAlignment | int | Read/Write | Returns or sets the vertical alignment of text on each page in a document or section. |
bidi | boolean | Read/Write | Specifies that this section contains bidirectional (complex scripts) text. |
layoutMode | int | Read/Write | Gets or sets the layout mode of this section. |
charactersPerLine | int | Read/Write | Gets or sets the number of characters per line in the document grid. |
linesPerPage | int | Read/Write | Gets or sets the number of lines per page in the document grid. |
pageWidth | double | Read/Write | Returns or sets the width of the page in points. |
pageHeight | double | Read/Write | Returns or sets the height of the page in points. |
margins | int | Read/Write | Returns or sets preset Margins of the page. |
paperSize | int | Read/Write | Returns or sets the paper size. |
orientation | int | Read/Write | Returns or sets the orientation of the page. |
leftMargin | double | Read/Write | Returns or sets the distance (in points) between the left edge of the page and the left boundary of the body text. |
rightMargin | double | Read/Write | Returns or sets the distance (in points) between the right edge of the page and the right boundary of the body text. |
topMargin | double | Read/Write | Returns or sets the distance (in points) between the top edge of the page and the top boundary of the body text. |
bottomMargin | double | Read/Write | Returns or sets the distance (in points) between the bottom edge of the page and the bottom boundary of the body text. |
headerDistance | double | Read/Write | Returns or sets the distance (in points) between the header and the top of the page. |
footerDistance | double | Read/Write | Returns or sets the distance (in points) between the footer and the bottom of the page. |
gutter | double | Read/Write | Gets or sets the amount of extra space added to the margin for document binding. |
firstPageTray | int | Read/Write | Gets or sets the paper tray (bin) to use for the first page of a section. |
otherPagesTray | int | Read/Write | Gets or sets the paper tray (bin) to be used for all but the first page of a section. |
headingLevelForChapter | int | Read/Write | Gets or sets the heading level style that is applied to the chapter titles in the document. |
chapterPageSeparator | int | Read/Write | Gets or sets the separator character that appears between the chapter number and the page number. |
pageNumberStyle | int | Read/Write | Gets or sets the page number format. |
restartPageNumbering | boolean | Read/Write | True if page numbering restarts at the beginning of the section. |
pageStartingNumber | int | Read/Write | Gets or sets the starting page number of the section. |
lineNumberRestartMode | int | Read/Write | Gets or sets the way line numbering runs that is, whether it starts over at the beginning of a new page or section or runs continuously. |
lineNumberCountBy | int | Read/Write | Returns or sets the numeric increment for line numbers. |
lineNumberDistanceFromText | double | Read/Write | Gets or sets distance between the right edge of line numbers and the left edge of the document. |
lineStartingNumber | int | Read/Write | Gets or sets the starting line number. |
textColumns | TextColumnCollection | Read | Returns a collection that represents the set of text columns. |
rtlGutter | boolean | Read/Write | Gets or sets whether Microsoft Word uses gutters for the section based on a right-to-left language or a left-to-right language. |
borderAlwaysInFront | boolean | Read/Write | Specifies where the page border is positioned relative to intersecting texts and objects. |
borderDistanceFrom | int | Read/Write | Gets or sets a value that indicates whether the specified page border is measured from the edge of the page or from the text it surrounds. |
borderAppliesTo | int | Read/Write | Specifies which pages the page border is printed on. |
borderSurroundsHeader | boolean | Read/Write | Specifies whether the page border includes or excludes the header. |
borderSurroundsFooter | boolean | Read/Write | Specifies whether the page border includes or excludes the footer. |
borders | BorderCollection | Read | Gets a collection of the page borders. |
footnoteOptions | FootnoteOptions | Read | Provides options that control numbering and positioning of footnotes in this section. |
endnoteOptions | EndnoteOptions | Read | Provides options that control numbering and positioning of endnotes in this section. |
textOrientation | int | Read/Write | Allows to specify TextOrientation for the whole page. |
Methods
| Signature | Description |
|---|---|
clearFormatting() | Resets page setup to default paper size, margins and orientation. |
getOddAndEvenPagesHeaderFooter() → boolean | True if the document has different headers and footers for odd-numbered and even-numbered pages. |
setOddAndEvenPagesHeaderFooter(value: boolean) | Sets the odd and even pages header footer value. |
getDifferentFirstPageHeaderFooter() → boolean | True if a different header or footer is used on the first page. |
setDifferentFirstPageHeaderFooter(value: boolean) | Sets the different first page header footer value. |
getMultiplePages() → int | For multiple page documents, gets or sets how a document is printed or rendered so that it can be bound as a booklet. |
setMultiplePages(value: int) | Sets the multiple pages value. |
getSheetsPerBooklet() → int | Returns or sets the number of pages to be included in each booklet. |
setSheetsPerBooklet(value: int) | Sets the sheets per booklet value. |
getSectionStart() → int | Returns or sets the type of section break for the specified object. |
setSectionStart(value: int) | Sets the section start value. |
getSuppressEndnotes() → boolean | True if endnotes are printed at the end of the next section that doesn’t suppress endnotes. |
setSuppressEndnotes(value: boolean) | Sets the suppress endnotes value. |
getVerticalAlignment() → int | Returns or sets the vertical alignment of text on each page in a document or section. |
setVerticalAlignment(value: int) | Sets the vertical alignment value. |
getBidi() → boolean | Specifies that this section contains bidirectional (complex scripts) text. |
setBidi(value: boolean) | Sets the bidi value. |
getLayoutMode() → int | Gets or sets the layout mode of this section. |
setLayoutMode(value: int) | Sets the layout mode value. |
getCharactersPerLine() → int | Gets or sets the number of characters per line in the document grid. |
setCharactersPerLine(value: int) | Sets the characters per line value. |
getLinesPerPage() → int | Gets or sets the number of lines per page in the document grid. |
setLinesPerPage(value: int) | Sets the lines per page value. |
getPageWidth() → double | Returns or sets the width of the page in points. |
setPageWidth(value: double) | Sets the page width value. |
getPageHeight() → double | Returns or sets the height of the page in points. |
setPageHeight(value: double) | Sets the page height value. |
getMargins() → int | Returns or sets preset Margins of the page. |
setMargins(value: int) | Sets the margins value. |
getPaperSize() → int | Returns or sets the paper size. |
setPaperSize(value: int) | Sets the paper size value. |
getOrientation() → int | Returns or sets the orientation of the page. |
setOrientation(value: int) | Sets the orientation value. |
getLeftMargin() → double | Returns or sets the distance (in points) between the left edge of the page and the left boundary of the body text. |
setLeftMargin(value: double) | Sets the left margin value. |
getRightMargin() → double | Returns or sets the distance (in points) between the right edge of the page and the right boundary of the body text. |
setRightMargin(value: double) | Sets the right margin value. |
getTopMargin() → double | Returns or sets the distance (in points) between the top edge of the page and the top boundary of the body text. |
setTopMargin(value: double) | Sets the top margin value. |
getBottomMargin() → double | Returns or sets the distance (in points) between the bottom edge of the page and the bottom boundary of the body text. |
setBottomMargin(value: double) | Sets the bottom margin value. |
getHeaderDistance() → double | Returns or sets the distance (in points) between the header and the top of the page. |
setHeaderDistance(value: double) | Sets the header distance value. |
getFooterDistance() → double | Returns or sets the distance (in points) between the footer and the bottom of the page. |
setFooterDistance(value: double) | Sets the footer distance value. |
getGutter() → double | Gets or sets the amount of extra space added to the margin for document binding. |
setGutter(value: double) | Sets the gutter value. |
getFirstPageTray() → int | Gets or sets the paper tray (bin) to use for the first page of a section. |
setFirstPageTray(value: int) | Sets the first page tray value. |
getOtherPagesTray() → int | Gets or sets the paper tray (bin) to be used for all but the first page of a section. |
setOtherPagesTray(value: int) | Sets the other pages tray value. |
getHeadingLevelForChapter() → int | Gets or sets the heading level style that is applied to the chapter titles in the document. |
setHeadingLevelForChapter(value: int) | Sets the heading level for chapter value. |
getChapterPageSeparator() → int | Gets or sets the separator character that appears between the chapter number and the page number. |
setChapterPageSeparator(value: int) | Sets the chapter page separator value. |
getPageNumberStyle() → int | Gets or sets the page number format. |
setPageNumberStyle(value: int) | Sets the page number style value. |
getRestartPageNumbering() → boolean | True if page numbering restarts at the beginning of the section. |
setRestartPageNumbering(value: boolean) | Sets the restart page numbering value. |
getPageStartingNumber() → int | Gets or sets the starting page number of the section. |
setPageStartingNumber(value: int) | Sets the page starting number value. |
getLineNumberRestartMode() → int | Gets or sets the way line numbering runs that is, whether it starts over at the beginning of a new page or section or runs continuously. |
setLineNumberRestartMode(value: int) | Sets the line number restart mode value. |
getLineNumberCountBy() → int | Returns or sets the numeric increment for line numbers. |
setLineNumberCountBy(value: int) | Sets the line number count by value. |
getLineNumberDistanceFromText() → double | Gets or sets distance between the right edge of line numbers and the left edge of the document. |
setLineNumberDistanceFromText(value: double) | Sets the line number distance from text value. |
getLineStartingNumber() → int | Gets or sets the starting line number. |
setLineStartingNumber(value: int) | Sets the line starting number value. |
getTextColumns() → TextColumnCollection | Returns a collection that represents the set of text columns. |
getRtlGutter() → boolean | Gets or sets whether Microsoft Word uses gutters for the section based on a right-to-left language or a left-to-right language. |
setRtlGutter(value: boolean) | Sets the rtl gutter value. |
getBorderAlwaysInFront() → boolean | Specifies where the page border is positioned relative to intersecting texts and objects. |
setBorderAlwaysInFront(value: boolean) | Sets the border always in front value. |
getBorderDistanceFrom() → int | Gets or sets a value that indicates whether the specified page border is measured from the edge of the page or from the text it surrounds. |
setBorderDistanceFrom(value: int) | Sets the border distance from value. |
getBorderAppliesTo() → int | Specifies which pages the page border is printed on. |
setBorderAppliesTo(value: int) | Sets the border applies to value. |
getBorderSurroundsHeader() → boolean | Specifies whether the page border includes or excludes the header. |
setBorderSurroundsHeader(value: boolean) | Sets the border surrounds header value. |
getBorderSurroundsFooter() → boolean | Specifies whether the page border includes or excludes the footer. |
setBorderSurroundsFooter(value: boolean) | Sets the border surrounds footer value. |
getBorders() → BorderCollection | Gets a collection of the page borders. |
getFootnoteOptions() → FootnoteOptions | Provides options that control numbering and positioning of footnotes in this section. |
getEndnoteOptions() → EndnoteOptions | Provides options that control numbering and positioning of endnotes in this section. |
getTextOrientation() → int | Allows to specify TextOrientation for the whole page. |
setTextOrientation(value: int) | Sets the text orientation value. |