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

NameTypeAccessDescription
oddAndEvenPagesHeaderFooterbooleanRead/WriteTrue if the document has different headers and footers for odd-numbered and even-numbered pages.
differentFirstPageHeaderFooterbooleanRead/WriteTrue if a different header or footer is used on the first page.
multiplePagesintRead/WriteFor multiple page documents, gets or sets how a document is printed or rendered so that it can be bound as a booklet.
sheetsPerBookletintRead/WriteReturns or sets the number of pages to be included in each booklet.
sectionStartintRead/WriteReturns or sets the type of section break for the specified object.
suppressEndnotesbooleanRead/WriteTrue if endnotes are printed at the end of the next section that doesn’t suppress endnotes.
verticalAlignmentintRead/WriteReturns or sets the vertical alignment of text on each page in a document or section.
bidibooleanRead/WriteSpecifies that this section contains bidirectional (complex scripts) text.
layoutModeintRead/WriteGets or sets the layout mode of this section.
charactersPerLineintRead/WriteGets or sets the number of characters per line in the document grid.
linesPerPageintRead/WriteGets or sets the number of lines per page in the document grid.
pageWidthdoubleRead/WriteReturns or sets the width of the page in points.
pageHeightdoubleRead/WriteReturns or sets the height of the page in points.
marginsintRead/WriteReturns or sets preset Margins of the page.
paperSizeintRead/WriteReturns or sets the paper size.
orientationintRead/WriteReturns or sets the orientation of the page.
leftMargindoubleRead/WriteReturns or sets the distance (in points) between the left edge of the page and the left boundary of the body text.
rightMargindoubleRead/WriteReturns or sets the distance (in points) between the right edge of the page and the right boundary of the body text.
topMargindoubleRead/WriteReturns or sets the distance (in points) between the top edge of the page and the top boundary of the body text.
bottomMargindoubleRead/WriteReturns or sets the distance (in points) between the bottom edge of the page and the bottom boundary of the body text.
headerDistancedoubleRead/WriteReturns or sets the distance (in points) between the header and the top of the page.
footerDistancedoubleRead/WriteReturns or sets the distance (in points) between the footer and the bottom of the page.
gutterdoubleRead/WriteGets or sets the amount of extra space added to the margin for document binding.
firstPageTrayintRead/WriteGets or sets the paper tray (bin) to use for the first page of a section.
otherPagesTrayintRead/WriteGets or sets the paper tray (bin) to be used for all but the first page of a section.
headingLevelForChapterintRead/WriteGets or sets the heading level style that is applied to the chapter titles in the document.
chapterPageSeparatorintRead/WriteGets or sets the separator character that appears between the chapter number and the page number.
pageNumberStyleintRead/WriteGets or sets the page number format.
restartPageNumberingbooleanRead/WriteTrue if page numbering restarts at the beginning of the section.
pageStartingNumberintRead/WriteGets or sets the starting page number of the section.
lineNumberRestartModeintRead/WriteGets 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.
lineNumberCountByintRead/WriteReturns or sets the numeric increment for line numbers.
lineNumberDistanceFromTextdoubleRead/WriteGets or sets distance between the right edge of line numbers and the left edge of the document.
lineStartingNumberintRead/WriteGets or sets the starting line number.
textColumnsTextColumnCollectionReadReturns a collection that represents the set of text columns.
rtlGutterbooleanRead/WriteGets or sets whether Microsoft Word uses gutters for the section based on a right-to-left language or a left-to-right language.
borderAlwaysInFrontbooleanRead/WriteSpecifies where the page border is positioned relative to intersecting texts and objects.
borderDistanceFromintRead/WriteGets 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.
borderAppliesTointRead/WriteSpecifies which pages the page border is printed on.
borderSurroundsHeaderbooleanRead/WriteSpecifies whether the page border includes or excludes the header.
borderSurroundsFooterbooleanRead/WriteSpecifies whether the page border includes or excludes the footer.
bordersBorderCollectionReadGets a collection of the page borders.
footnoteOptionsFootnoteOptionsReadProvides options that control numbering and positioning of footnotes in this section.
endnoteOptionsEndnoteOptionsReadProvides options that control numbering and positioning of endnotes in this section.
textOrientationintRead/WriteAllows to specify TextOrientation for the whole page.

Methods

SignatureDescription
clearFormatting()Resets page setup to default paper size, margins and orientation.
getOddAndEvenPagesHeaderFooter() → booleanTrue 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() → booleanTrue if a different header or footer is used on the first page.
setDifferentFirstPageHeaderFooter(value: boolean)Sets the different first page header footer value.
getMultiplePages() → intFor 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() → intReturns or sets the number of pages to be included in each booklet.
setSheetsPerBooklet(value: int)Sets the sheets per booklet value.
getSectionStart() → intReturns or sets the type of section break for the specified object.
setSectionStart(value: int)Sets the section start value.
getSuppressEndnotes() → booleanTrue 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() → intReturns or sets the vertical alignment of text on each page in a document or section.
setVerticalAlignment(value: int)Sets the vertical alignment value.
getBidi() → booleanSpecifies that this section contains bidirectional (complex scripts) text.
setBidi(value: boolean)Sets the bidi value.
getLayoutMode() → intGets or sets the layout mode of this section.
setLayoutMode(value: int)Sets the layout mode value.
getCharactersPerLine() → intGets or sets the number of characters per line in the document grid.
setCharactersPerLine(value: int)Sets the characters per line value.
getLinesPerPage() → intGets or sets the number of lines per page in the document grid.
setLinesPerPage(value: int)Sets the lines per page value.
getPageWidth() → doubleReturns or sets the width of the page in points.
setPageWidth(value: double)Sets the page width value.
getPageHeight() → doubleReturns or sets the height of the page in points.
setPageHeight(value: double)Sets the page height value.
getMargins() → intReturns or sets preset Margins of the page.
setMargins(value: int)Sets the margins value.
getPaperSize() → intReturns or sets the paper size.
setPaperSize(value: int)Sets the paper size value.
getOrientation() → intReturns or sets the orientation of the page.
setOrientation(value: int)Sets the orientation value.
getLeftMargin() → doubleReturns 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() → doubleReturns 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() → doubleReturns 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() → doubleReturns 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() → doubleReturns or sets the distance (in points) between the header and the top of the page.
setHeaderDistance(value: double)Sets the header distance value.
getFooterDistance() → doubleReturns or sets the distance (in points) between the footer and the bottom of the page.
setFooterDistance(value: double)Sets the footer distance value.
getGutter() → doubleGets or sets the amount of extra space added to the margin for document binding.
setGutter(value: double)Sets the gutter value.
getFirstPageTray() → intGets 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() → intGets 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() → intGets 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() → intGets 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() → intGets or sets the page number format.
setPageNumberStyle(value: int)Sets the page number style value.
getRestartPageNumbering() → booleanTrue if page numbering restarts at the beginning of the section.
setRestartPageNumbering(value: boolean)Sets the restart page numbering value.
getPageStartingNumber() → intGets or sets the starting page number of the section.
setPageStartingNumber(value: int)Sets the page starting number value.
getLineNumberRestartMode() → intGets 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() → intReturns or sets the numeric increment for line numbers.
setLineNumberCountBy(value: int)Sets the line number count by value.
getLineNumberDistanceFromText() → doubleGets 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() → intGets or sets the starting line number.
setLineStartingNumber(value: int)Sets the line starting number value.
getTextColumns() → TextColumnCollectionReturns a collection that represents the set of text columns.
getRtlGutter() → booleanGets 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() → booleanSpecifies where the page border is positioned relative to intersecting texts and objects.
setBorderAlwaysInFront(value: boolean)Sets the border always in front value.
getBorderDistanceFrom() → intGets 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() → intSpecifies which pages the page border is printed on.
setBorderAppliesTo(value: int)Sets the border applies to value.
getBorderSurroundsHeader() → booleanSpecifies whether the page border includes or excludes the header.
setBorderSurroundsHeader(value: boolean)Sets the border surrounds header value.
getBorderSurroundsFooter() → booleanSpecifies whether the page border includes or excludes the footer.
setBorderSurroundsFooter(value: boolean)Sets the border surrounds footer value.
getBorders() → BorderCollectionGets a collection of the page borders.
getFootnoteOptions() → FootnoteOptionsProvides options that control numbering and positioning of footnotes in this section.
getEndnoteOptions() → EndnoteOptionsProvides options that control numbering and positioning of endnotes in this section.
getTextOrientation() → intAllows to specify TextOrientation for the whole page.
setTextOrientation(value: int)Sets the text orientation value.

See Also