PageSetup
Inheritance: java.lang.Object
public class PageSetup
Represents the page setup properties of a section.
To learn more, visit the Working with Sections documentation article.
PageSetup object contains all the page setup attributes of a section (left margin, bottom margin, paper size, and so on) as properties.
Methods
Method | Description |
---|---|
clearFormatting() | Resets page setup to default paper size, margins and orientation. |
equals(Object arg0) | |
fetchInheritedBorderAttr(int key) | |
getBidi() | Specifies that this section contains bidirectional (complex scripts) text. |
getBorderAlwaysInFront() | Specifies where the page border is positioned relative to intersecting texts and objects. |
getBorderAppliesTo() | Specifies which pages the page border is printed on. |
getBorderDistanceFrom() | Gets a value that indicates whether the specified page border is measured from the edge of the page or from the text it surrounds. |
getBorderSurroundsFooter() | Specifies whether the page border includes or excludes the footer. |
getBorderSurroundsHeader() | Specifies whether the page border includes or excludes the header. |
getBorders() | Gets a collection of the page borders. |
getBottomMargin() | Gets the distance (in points) between the bottom edge of the page and the bottom boundary of the body text. |
getChapterPageSeparator() | Gets the separator character that appears between the chapter number and the page number. |
getCharactersPerLine() | Gets the number of characters per line in the document grid. |
getClass() | |
getDifferentFirstPageHeaderFooter() | True if a different header or footer is used on the first page. |
getDirectBorderAttr(int key) | |
getEndnoteOptions() | Provides options that control numbering and positioning of endnotes in this section. |
getFirstPageTray() | Gets the paper tray (bin) to use for the first page of a section. |
getFooterDistance() | Gets the distance (in points) between the footer and the bottom of the page. |
getFootnoteOptions() | Provides options that control numbering and positioning of footnotes in this section. |
getGutter() | Gets the amount of extra space added to the margin for document binding. |
getHeaderDistance() | Gets the distance (in points) between the header and the top of the page. |
getHeadingLevelForChapter() | Gets the heading level style that is applied to the chapter titles in the document. |
getLayoutMode() | Gets the layout mode of this section. |
getLeftMargin() | Gets the distance (in points) between the left edge of the page and the left boundary of the body text. |
getLineNumberCountBy() | Gets the numeric increment for line numbers. |
getLineNumberDistanceFromText() | Gets distance between the right edge of line numbers and the left edge of the document. |
getLineNumberRestartMode() | Gets the way line numbering runs that is, whether it starts over at the beginning of a new page or section or runs continuously. |
getLineStartingNumber() | Gets the starting line number. |
getLinesPerPage() | Gets the number of lines per page in the document grid. |
getMargins() | Gets preset Margins of the page. |
getMultiplePages() | For multiple page documents, gets or sets how a document is printed or rendered so that it can be bound as a booklet. |
getOddAndEvenPagesHeaderFooter() | True if the document has different headers and footers for odd-numbered and even-numbered pages. |
getOrientation() | Gets the orientation of the page. |
getOtherPagesTray() | Gets the paper tray (bin) to be used for all but the first page of a section. |
getPageHeight() | Gets the height of the page in points. |
getPageNumberStyle() | Gets the page number format. |
getPageStartingNumber() | Gets the starting page number of the section. |
getPageWidth() | Gets the width of the page in points. |
getPaperSize() | Gets the paper size. |
getRestartPageNumbering() | True if page numbering restarts at the beginning of the section. |
getRightMargin() | Gets the distance (in points) between the right edge of the page and the right boundary of the body text. |
getRtlGutter() | Gets whether Microsoft Word uses gutters for the section based on a right-to-left language or a left-to-right language. |
getSectionStart() | Gets the type of section break for the specified object. |
getSheetsPerBooklet() | Gets the number of pages to be included in each booklet. |
getSuppressEndnotes() | True if endnotes are printed at the end of the next section that doesn’t suppress endnotes. |
getTextColumns() | Returns a collection that represents the set of text columns. |
getTextOrientation() | Allows to specify getTextOrientation() / setTextOrientation(int) for the whole page. |
getTopMargin() | Gets the distance (in points) between the top edge of the page and the top boundary of the body text. |
getVerticalAlignment() | Gets the vertical alignment of text on each page in a document or section. |
hashCode() | |
notify() | |
notifyAll() | |
setBidi(boolean value) | Specifies that this section contains bidirectional (complex scripts) text. |
setBorderAlwaysInFront(boolean value) | Specifies where the page border is positioned relative to intersecting texts and objects. |
setBorderAppliesTo(int value) | Specifies which pages the page border is printed on. |
setBorderAttr(int key, Object value) | |
setBorderDistanceFrom(int value) | Sets a value that indicates whether the specified page border is measured from the edge of the page or from the text it surrounds. |
setBorderSurroundsFooter(boolean value) | Specifies whether the page border includes or excludes the footer. |
setBorderSurroundsHeader(boolean value) | Specifies whether the page border includes or excludes the header. |
setBottomMargin(double value) | Sets the distance (in points) between the bottom edge of the page and the bottom boundary of the body text. |
setChapterPageSeparator(int value) | Sets the separator character that appears between the chapter number and the page number. |
setCharactersPerLine(int value) | Sets the number of characters per line in the document grid. |
setDifferentFirstPageHeaderFooter(boolean value) | True if a different header or footer is used on the first page. |
setFirstPageTray(int value) | Sets the paper tray (bin) to use for the first page of a section. |
setFooterDistance(double value) | Sets the distance (in points) between the footer and the bottom of the page. |
setGutter(double value) | Sets the amount of extra space added to the margin for document binding. |
setHeaderDistance(double value) | Sets the distance (in points) between the header and the top of the page. |
setHeadingLevelForChapter(int value) | Sets the heading level style that is applied to the chapter titles in the document. |
setLayoutMode(int value) | Sets the layout mode of this section. |
setLeftMargin(double value) | Sets the distance (in points) between the left edge of the page and the left boundary of the body text. |
setLineNumberCountBy(int value) | Sets the numeric increment for line numbers. |
setLineNumberDistanceFromText(double value) | Sets distance between the right edge of line numbers and the left edge of the document. |
setLineNumberRestartMode(int value) | Sets the way line numbering runs that is, whether it starts over at the beginning of a new page or section or runs continuously. |
setLineStartingNumber(int value) | Sets the starting line number. |
setLinesPerPage(int value) | Sets the number of lines per page in the document grid. |
setMargins(int value) | Sets preset Margins of the page. |
setMultiplePages(int value) | For multiple page documents, gets or sets how a document is printed or rendered so that it can be bound as a booklet. |
setOddAndEvenPagesHeaderFooter(boolean value) | True if the document has different headers and footers for odd-numbered and even-numbered pages. |
setOrientation(int value) | Sets the orientation of the page. |
setOtherPagesTray(int value) | Sets the paper tray (bin) to be used for all but the first page of a section. |
setPageHeight(double value) | Sets the height of the page in points. |
setPageNumberStyle(int value) | Sets the page number format. |
setPageStartingNumber(int value) | Sets the starting page number of the section. |
setPageWidth(double value) | Sets the width of the page in points. |
setPaperSize(int value) | Sets the paper size. |
setRestartPageNumbering(boolean value) | True if page numbering restarts at the beginning of the section. |
setRightMargin(double value) | Sets the distance (in points) between the right edge of the page and the right boundary of the body text. |
setRtlGutter(boolean value) | Sets whether Microsoft Word uses gutters for the section based on a right-to-left language or a left-to-right language. |
setSectionStart(int value) | Sets the type of section break for the specified object. |
setSheetsPerBooklet(int value) | Sets the number of pages to be included in each booklet. |
setSuppressEndnotes(boolean value) | True if endnotes are printed at the end of the next section that doesn’t suppress endnotes. |
setTextOrientation(int value) | Allows to specify getTextOrientation() / setTextOrientation(int) for the whole page. |
setTopMargin(double value) | Sets the distance (in points) between the top edge of the page and the top boundary of the body text. |
setVerticalAlignment(int value) | Sets the vertical alignment of text on each page in a document or section. |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
clearFormatting()
public void clearFormatting()
Resets page setup to default paper size, margins and orientation.
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
fetchInheritedBorderAttr(int key)
public Object fetchInheritedBorderAttr(int key)
Parameters:
Parameter | Type | Description |
---|---|---|
key | int |
Returns: java.lang.Object
getBidi()
public boolean getBidi()
Specifies that this section contains bidirectional (complex scripts) text.
When true , the columns in this section are laid out from right to left.
Returns: boolean - The corresponding boolean value.
getBorderAlwaysInFront()
public boolean getBorderAlwaysInFront()
Specifies where the page border is positioned relative to intersecting texts and objects.
Returns: boolean - The corresponding boolean value.
getBorderAppliesTo()
public int getBorderAppliesTo()
Specifies which pages the page border is printed on.
Returns: int - The corresponding int value. The returned value is one of PageBorderAppliesTo constants.
getBorderDistanceFrom()
public int getBorderDistanceFrom()
Gets a value that indicates whether the specified page border is measured from the edge of the page or from the text it surrounds.
Returns: int - A value that indicates whether the specified page border is measured from the edge of the page or from the text it surrounds. The returned value is one of PageBorderDistanceFrom constants.
getBorderSurroundsFooter()
public boolean getBorderSurroundsFooter()
Specifies whether the page border includes or excludes the footer. Note, changing this property affects all sections in the document.
Returns: boolean - The corresponding boolean value.
getBorderSurroundsHeader()
public boolean getBorderSurroundsHeader()
Specifies whether the page border includes or excludes the header. Note, changing this property affects all sections in the document.
Returns: boolean - The corresponding boolean value.
getBorders()
public BorderCollection getBorders()
Gets a collection of the page borders.
Returns: BorderCollection - A collection of the page borders.
getBottomMargin()
public double getBottomMargin()
Gets the distance (in points) between the bottom edge of the page and the bottom boundary of the body text.
Returns: double - The distance (in points) between the bottom edge of the page and the bottom boundary of the body text.
getChapterPageSeparator()
public int getChapterPageSeparator()
Gets the separator character that appears between the chapter number and the page number.
Before you can create page numbers that include chapter numbers, the document headings must have a numbered outline format applied.
Returns: int - The separator character that appears between the chapter number and the page number. The returned value is one of ChapterPageSeparator constants.
getCharactersPerLine()
public int getCharactersPerLine()
Gets the number of characters per line in the document grid.
Minimum value of the property is 1. Maximum value depends on page width and font size of the Normal style. Minimum character pitch is 90 percent of the font size. For example, maximum number of characters per line of a Letter page with one-inch margins is 43.
By default, the property has a value, on which character pitch equals to font size of the Normal style.
Returns: int - The number of characters per line in the document grid.
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class>
getDifferentFirstPageHeaderFooter()
public boolean getDifferentFirstPageHeaderFooter()
True if a different header or footer is used on the first page.
Returns: boolean - The corresponding boolean value.
getDirectBorderAttr(int key)
public Object getDirectBorderAttr(int key)
Parameters:
Parameter | Type | Description |
---|---|---|
key | int |
Returns: java.lang.Object
getEndnoteOptions()
public EndnoteOptions getEndnoteOptions()
Provides options that control numbering and positioning of endnotes in this section.
Returns: EndnoteOptions - The corresponding EndnoteOptions value.
getFirstPageTray()
public int getFirstPageTray()
Gets the paper tray (bin) to use for the first page of a section. The value is implementation (printer) specific.
Returns: int - The paper tray (bin) to use for the first page of a section.
getFooterDistance()
public double getFooterDistance()
Gets the distance (in points) between the footer and the bottom of the page.
Returns: double - The distance (in points) between the footer and the bottom of the page.
getFootnoteOptions()
public FootnoteOptions getFootnoteOptions()
Provides options that control numbering and positioning of footnotes in this section.
Returns: FootnoteOptions - The corresponding FootnoteOptions value.
getGutter()
public double getGutter()
Gets the amount of extra space added to the margin for document binding.
Returns: double - The amount of extra space added to the margin for document binding.
getHeaderDistance()
public double getHeaderDistance()
Gets the distance (in points) between the header and the top of the page.
Returns: double - The distance (in points) between the header and the top of the page.
getHeadingLevelForChapter()
public int getHeadingLevelForChapter()
Gets the heading level style that is applied to the chapter titles in the document.
Can be a number from 0 through 9. 0 means no chapter number if applied to page number.
Before you can create page numbers that include chapter numbers, the document headings must have a numbered outline format applied.
Returns: int - The heading level style that is applied to the chapter titles in the document.
getLayoutMode()
public int getLayoutMode()
Gets the layout mode of this section.
Returns: int - The layout mode of this section. The returned value is one of SectionLayoutMode constants.
getLeftMargin()
public double getLeftMargin()
Gets the distance (in points) between the left edge of the page and the left boundary of the body text.
Returns: double - The distance (in points) between the left edge of the page and the left boundary of the body text.
getLineNumberCountBy()
public int getLineNumberCountBy()
Gets the numeric increment for line numbers.
Returns: int - The numeric increment for line numbers.
getLineNumberDistanceFromText()
public double getLineNumberDistanceFromText()
Gets distance between the right edge of line numbers and the left edge of the document. Set this property to zero for automatic distance between the line numbers and text of the document.
Returns: double - Distance between the right edge of line numbers and the left edge of the document.
getLineNumberRestartMode()
public int getLineNumberRestartMode()
Gets the way line numbering runs that is, whether it starts over at the beginning of a new page or section or runs continuously.
Returns: int - The way line numbering runs that is, whether it starts over at the beginning of a new page or section or runs continuously. The returned value is one of LineNumberRestartMode constants.
getLineStartingNumber()
public int getLineStartingNumber()
Gets the starting line number.
Returns: int - The starting line number.
getLinesPerPage()
public int getLinesPerPage()
Gets the number of lines per page in the document grid.
Minimum value of the property is 1. Maximum value depends on page height and font size of the Normal style. Minimum line pitch is 136 percent of the font size. For example, maximum number of lines per page of a Letter page with one-inch margins is 39.
By default, the property has a value, on which line pitch is in 1.5 times greater than font size of the Normal style.
Returns: int - The number of lines per page in the document grid.
getMargins()
public int getMargins()
Gets preset Margins of the page.
Returns: int - Preset Margins of the page. The returned value is one of Margins constants.
getMultiplePages()
public int getMultiplePages()
For multiple page documents, gets or sets how a document is printed or rendered so that it can be bound as a booklet.
Returns: int - The corresponding int value. The returned value is one of MultiplePagesType constants.
getOddAndEvenPagesHeaderFooter()
public boolean getOddAndEvenPagesHeaderFooter()
True if the document has different headers and footers for odd-numbered and even-numbered pages. Note, changing this property affects all sections in the document.
Returns: boolean - The corresponding boolean value.
getOrientation()
public int getOrientation()
Gets the orientation of the page.
Changing getOrientation() / setOrientation(int) swaps getPageWidth() / setPageWidth(double) and getPageHeight() / setPageHeight(double).
Returns: int - The orientation of the page. The returned value is one of Orientation constants.
getOtherPagesTray()
public int getOtherPagesTray()
Gets the paper tray (bin) to be used for all but the first page of a section. The value is implementation (printer) specific.
Returns: int - The paper tray (bin) to be used for all but the first page of a section.
getPageHeight()
public double getPageHeight()
Gets the height of the page in points.
Returns: double - The height of the page in points.
getPageNumberStyle()
public int getPageNumberStyle()
Gets the page number format.
Returns: int - The page number format. The returned value is one of NumberStyle constants.
getPageStartingNumber()
public int getPageStartingNumber()
Gets the starting page number of the section. The getRestartPageNumbering() / setRestartPageNumbering(boolean) property, if set to false , will override the getPageStartingNumber() / setPageStartingNumber(int) property so that page numbering can continue from the previous section.
Returns: int - The starting page number of the section.
getPageWidth()
public double getPageWidth()
Gets the width of the page in points.
Returns: double - The width of the page in points.
getPaperSize()
public int getPaperSize()
Gets the paper size.
Setting this property updates getPageWidth() / setPageWidth(double) and getPageHeight() / setPageHeight(double) values. Setting this value to PaperSize.CUSTOM does not change existing values.
Returns: int - The paper size. The returned value is one of PaperSize constants.
getRestartPageNumbering()
public boolean getRestartPageNumbering()
True if page numbering restarts at the beginning of the section. If set to false , the getRestartPageNumbering() / setRestartPageNumbering(boolean) property will override the getPageStartingNumber() / setPageStartingNumber(int) property so that page numbering can continue from the previous section.
Returns: boolean - The corresponding boolean value.
getRightMargin()
public double getRightMargin()
Gets the distance (in points) between the right edge of the page and the right boundary of the body text.
Returns: double - The distance (in points) between the right edge of the page and the right boundary of the body text.
getRtlGutter()
public boolean getRtlGutter()
Gets whether Microsoft Word uses gutters for the section based on a right-to-left language or a left-to-right language.
Returns: boolean - Whether Microsoft Word uses gutters for the section based on a right-to-left language or a left-to-right language.
getSectionStart()
public int getSectionStart()
Gets the type of section break for the specified object.
Returns: int - The type of section break for the specified object. The returned value is one of SectionStart constants.
getSheetsPerBooklet()
public int getSheetsPerBooklet()
Gets the number of pages to be included in each booklet.
Returns: int - The number of pages to be included in each booklet.
getSuppressEndnotes()
public boolean getSuppressEndnotes()
True if endnotes are printed at the end of the next section that doesn’t suppress endnotes. Suppressed endnotes are printed before the endnotes in that section.
Returns: boolean - The corresponding boolean value.
getTextColumns()
public TextColumnCollection getTextColumns()
Returns a collection that represents the set of text columns.
Returns: TextColumnCollection - A collection that represents the set of text columns.
getTextOrientation()
public int getTextOrientation()
Allows to specify getTextOrientation() / setTextOrientation(int) for the whole page. Default value is TextOrientation.HORIZONTAL This property is only supported for MS Word native formats DOCX, WML, RTF and DOC.
Returns: int - The corresponding int value. The returned value is one of TextOrientation constants.
getTopMargin()
public double getTopMargin()
Gets the distance (in points) between the top edge of the page and the top boundary of the body text.
Returns: double - The distance (in points) between the top edge of the page and the top boundary of the body text.
getVerticalAlignment()
public int getVerticalAlignment()
Gets the vertical alignment of text on each page in a document or section.
Returns: int - The vertical alignment of text on each page in a document or section. The returned value is one of PageVerticalAlignment constants.
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setBidi(boolean value)
public void setBidi(boolean value)
Specifies that this section contains bidirectional (complex scripts) text.
When true , the columns in this section are laid out from right to left.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The corresponding boolean value. |
setBorderAlwaysInFront(boolean value)
public void setBorderAlwaysInFront(boolean value)
Specifies where the page border is positioned relative to intersecting texts and objects.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The corresponding boolean value. |
setBorderAppliesTo(int value)
public void setBorderAppliesTo(int value)
Specifies which pages the page border is printed on.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The corresponding int value. The value must be one of PageBorderAppliesTo constants. |
setBorderAttr(int key, Object value)
public void setBorderAttr(int key, Object value)
Parameters:
Parameter | Type | Description |
---|---|---|
key | int | |
value | java.lang.Object |
setBorderDistanceFrom(int value)
public void setBorderDistanceFrom(int value)
Sets a value that indicates whether the specified page border is measured from the edge of the page or from the text it surrounds.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | A value that indicates whether the specified page border is measured from the edge of the page or from the text it surrounds. The value must be one of PageBorderDistanceFrom constants. |
setBorderSurroundsFooter(boolean value)
public void setBorderSurroundsFooter(boolean value)
Specifies whether the page border includes or excludes the footer. Note, changing this property affects all sections in the document.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The corresponding boolean value. |
setBorderSurroundsHeader(boolean value)
public void setBorderSurroundsHeader(boolean value)
Specifies whether the page border includes or excludes the header. Note, changing this property affects all sections in the document.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The corresponding boolean value. |
setBottomMargin(double value)
public void setBottomMargin(double value)
Sets the distance (in points) between the bottom edge of the page and the bottom boundary of the body text.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | The distance (in points) between the bottom edge of the page and the bottom boundary of the body text. |
setChapterPageSeparator(int value)
public void setChapterPageSeparator(int value)
Sets the separator character that appears between the chapter number and the page number.
Before you can create page numbers that include chapter numbers, the document headings must have a numbered outline format applied.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The separator character that appears between the chapter number and the page number. The value must be one of ChapterPageSeparator constants. |
setCharactersPerLine(int value)
public void setCharactersPerLine(int value)
Sets the number of characters per line in the document grid.
Minimum value of the property is 1. Maximum value depends on page width and font size of the Normal style. Minimum character pitch is 90 percent of the font size. For example, maximum number of characters per line of a Letter page with one-inch margins is 43.
By default, the property has a value, on which character pitch equals to font size of the Normal style.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The number of characters per line in the document grid. |
setDifferentFirstPageHeaderFooter(boolean value)
public void setDifferentFirstPageHeaderFooter(boolean value)
True if a different header or footer is used on the first page.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The corresponding boolean value. |
setFirstPageTray(int value)
public void setFirstPageTray(int value)
Sets the paper tray (bin) to use for the first page of a section. The value is implementation (printer) specific.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The paper tray (bin) to use for the first page of a section. |
setFooterDistance(double value)
public void setFooterDistance(double value)
Sets the distance (in points) between the footer and the bottom of the page.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | The distance (in points) between the footer and the bottom of the page. |
setGutter(double value)
public void setGutter(double value)
Sets the amount of extra space added to the margin for document binding.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | The amount of extra space added to the margin for document binding. |
setHeaderDistance(double value)
public void setHeaderDistance(double value)
Sets the distance (in points) between the header and the top of the page.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | The distance (in points) between the header and the top of the page. |
setHeadingLevelForChapter(int value)
public void setHeadingLevelForChapter(int value)
Sets the heading level style that is applied to the chapter titles in the document.
Can be a number from 0 through 9. 0 means no chapter number if applied to page number.
Before you can create page numbers that include chapter numbers, the document headings must have a numbered outline format applied.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The heading level style that is applied to the chapter titles in the document. |
setLayoutMode(int value)
public void setLayoutMode(int value)
Sets the layout mode of this section.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The layout mode of this section. The value must be one of SectionLayoutMode constants. |
setLeftMargin(double value)
public void setLeftMargin(double value)
Sets the distance (in points) between the left edge of the page and the left boundary of the body text.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | The distance (in points) between the left edge of the page and the left boundary of the body text. |
setLineNumberCountBy(int value)
public void setLineNumberCountBy(int value)
Sets the numeric increment for line numbers.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The numeric increment for line numbers. |
setLineNumberDistanceFromText(double value)
public void setLineNumberDistanceFromText(double value)
Sets distance between the right edge of line numbers and the left edge of the document. Set this property to zero for automatic distance between the line numbers and text of the document.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | Distance between the right edge of line numbers and the left edge of the document. |
setLineNumberRestartMode(int value)
public void setLineNumberRestartMode(int value)
Sets the way line numbering runs that is, whether it starts over at the beginning of a new page or section or runs continuously.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The way line numbering runs that is, whether it starts over at the beginning of a new page or section or runs continuously. The value must be one of LineNumberRestartMode constants. |
setLineStartingNumber(int value)
public void setLineStartingNumber(int value)
Sets the starting line number.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The starting line number. |
setLinesPerPage(int value)
public void setLinesPerPage(int value)
Sets the number of lines per page in the document grid.
Minimum value of the property is 1. Maximum value depends on page height and font size of the Normal style. Minimum line pitch is 136 percent of the font size. For example, maximum number of lines per page of a Letter page with one-inch margins is 39.
By default, the property has a value, on which line pitch is in 1.5 times greater than font size of the Normal style.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The number of lines per page in the document grid. |
setMargins(int value)
public void setMargins(int value)
Sets preset Margins of the page.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | Preset Margins of the page. The value must be one of Margins constants. |
setMultiplePages(int value)
public void setMultiplePages(int value)
For multiple page documents, gets or sets how a document is printed or rendered so that it can be bound as a booklet.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The corresponding int value. The value must be one of MultiplePagesType constants. |
setOddAndEvenPagesHeaderFooter(boolean value)
public void setOddAndEvenPagesHeaderFooter(boolean value)
True if the document has different headers and footers for odd-numbered and even-numbered pages. Note, changing this property affects all sections in the document.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The corresponding boolean value. |
setOrientation(int value)
public void setOrientation(int value)
Sets the orientation of the page.
Changing getOrientation() / setOrientation(int) swaps getPageWidth() / setPageWidth(double) and getPageHeight() / setPageHeight(double).
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The orientation of the page. The value must be one of Orientation constants. |
setOtherPagesTray(int value)
public void setOtherPagesTray(int value)
Sets the paper tray (bin) to be used for all but the first page of a section. The value is implementation (printer) specific.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The paper tray (bin) to be used for all but the first page of a section. |
setPageHeight(double value)
public void setPageHeight(double value)
Sets the height of the page in points.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | The height of the page in points. |
setPageNumberStyle(int value)
public void setPageNumberStyle(int value)
Sets the page number format.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The page number format. The value must be one of NumberStyle constants. |
setPageStartingNumber(int value)
public void setPageStartingNumber(int value)
Sets the starting page number of the section. The getRestartPageNumbering() / setRestartPageNumbering(boolean) property, if set to false , will override the getPageStartingNumber() / setPageStartingNumber(int) property so that page numbering can continue from the previous section.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The starting page number of the section. |
setPageWidth(double value)
public void setPageWidth(double value)
Sets the width of the page in points.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | The width of the page in points. |
setPaperSize(int value)
public void setPaperSize(int value)
Sets the paper size.
Setting this property updates getPageWidth() / setPageWidth(double) and getPageHeight() / setPageHeight(double) values. Setting this value to PaperSize.CUSTOM does not change existing values.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The paper size. The value must be one of PaperSize constants. |
setRestartPageNumbering(boolean value)
public void setRestartPageNumbering(boolean value)
True if page numbering restarts at the beginning of the section. If set to false , the getRestartPageNumbering() / setRestartPageNumbering(boolean) property will override the getPageStartingNumber() / setPageStartingNumber(int) property so that page numbering can continue from the previous section.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The corresponding boolean value. |
setRightMargin(double value)
public void setRightMargin(double value)
Sets the distance (in points) between the right edge of the page and the right boundary of the body text.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | The distance (in points) between the right edge of the page and the right boundary of the body text. |
setRtlGutter(boolean value)
public void setRtlGutter(boolean value)
Sets whether Microsoft Word uses gutters for the section based on a right-to-left language or a left-to-right language.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | Whether Microsoft Word uses gutters for the section based on a right-to-left language or a left-to-right language. |
setSectionStart(int value)
public void setSectionStart(int value)
Sets the type of section break for the specified object.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The type of section break for the specified object. The value must be one of SectionStart constants. |
setSheetsPerBooklet(int value)
public void setSheetsPerBooklet(int value)
Sets the number of pages to be included in each booklet.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The number of pages to be included in each booklet. |
setSuppressEndnotes(boolean value)
public void setSuppressEndnotes(boolean value)
True if endnotes are printed at the end of the next section that doesn’t suppress endnotes. Suppressed endnotes are printed before the endnotes in that section.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The corresponding boolean value. |
setTextOrientation(int value)
public void setTextOrientation(int value)
Allows to specify getTextOrientation() / setTextOrientation(int) for the whole page. Default value is TextOrientation.HORIZONTAL This property is only supported for MS Word native formats DOCX, WML, RTF and DOC.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The corresponding int value. The value must be one of TextOrientation constants. |
setTopMargin(double value)
public void setTopMargin(double value)
Sets the distance (in points) between the top edge of the page and the top boundary of the body text.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | The distance (in points) between the top edge of the page and the top boundary of the body text. |
setVerticalAlignment(int value)
public void setVerticalAlignment(int value)
Sets the vertical alignment of text on each page in a document or section.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The vertical alignment of text on each page in a document or section. The value must be one of PageVerticalAlignment constants. |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |