Package com.deltawalker.script
Interface PageSettings
public interface PageSettings
The page settings used when printing comparisons: orientation, margins,
header and footer. Obtained with
App.getSettings().getPage().
const PageOrientation = Java.type('com.deltawalker.script.PageOrientation');
const page = App.getSettings().getPage();
page.setOrientation(PageOrientation.LANDSCAPE);
page.setPrintHeader(true);
- Since:
- 2.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the text of the footer printed in the center of the pages.Returns the text of the footer printed on the left of the pages.Returns the text of the footer printed on the right of the pages.Returns the text of the header printed in the center of the pages.Returns the text of the header printed on the left of the pages.Returns the text of the header printed on the right of the pages.floatReturns the bottom margin of the page, in the unit returned bygetMarginUnit().floatReturns the left margin of the page, in the unit returned bygetMarginUnit().floatReturns the right margin of the page, in the unit returned bygetMarginUnit().floatReturns the top margin of the page, in the unit returned bygetMarginUnit().Returns the unit the page margins are measured in.Returns the orientation of the printed pages, eitherPageOrientation.PORTRAITorPageOrientation.LANDSCAPE.booleanAnswers whether a footer is printed on the pages.booleanAnswers whether a header is printed on the pages.voidsetMarginUnit(MarginUnit pageUnit) Sets the unit the page margins are measured in.voidsetOrientation(PageOrientation orientation) Sets the orientation of the printed pages.voidsetPrintFooter(boolean printFooter) Sets whether a footer is printed on the pages.voidsetPrintHeader(boolean printHeader) Sets whether a header is printed on the pages.
-
Method Details
-
getHeaderCenter
String getHeaderCenter()Returns the text of the header printed in the center of the pages.- Returns:
- the center header text
- Since:
- 2.0
-
getHeaderLeft
String getHeaderLeft()Returns the text of the header printed on the left of the pages.- Returns:
- the left header text
- Since:
- 2.0
-
getHeaderRight
String getHeaderRight()Returns the text of the header printed on the right of the pages.- Returns:
- the right header text
- Since:
- 2.0
-
getMarginBottom
float getMarginBottom()Returns the bottom margin of the page, in the unit returned bygetMarginUnit().- Returns:
- the bottom margin
- Since:
- 2.0
-
getMarginLeft
float getMarginLeft()Returns the left margin of the page, in the unit returned bygetMarginUnit().- Returns:
- the left margin
- Since:
- 2.0
-
getMarginRight
float getMarginRight()Returns the right margin of the page, in the unit returned bygetMarginUnit().- Returns:
- the right margin
- Since:
- 2.0
-
getMarginTop
float getMarginTop()Returns the top margin of the page, in the unit returned bygetMarginUnit().- Returns:
- the top margin
- Since:
- 2.0
-
getMarginUnit
MarginUnit getMarginUnit()Returns the unit the page margins are measured in.- Returns:
- the unit of the page margins
- Since:
- 2.0
-
getOrientation
PageOrientation getOrientation()Returns the orientation of the printed pages, eitherPageOrientation.PORTRAITorPageOrientation.LANDSCAPE.- Returns:
- the page orientation
- Since:
- 2.0
-
getPrintHeader
boolean getPrintHeader()Answers whether a header is printed on the pages.- Returns:
trueif printed pages will have a header;false, otherwise- Since:
- 2.0
-
setMarginUnit
Sets the unit the page margins are measured in.- Parameters:
pageUnit- the unit of the page margins; cannot benull- Throws:
NullPointerException- ifpageUnitisnull- Since:
- 2.0
-
setOrientation
Sets the orientation of the printed pages.- Parameters:
orientation- the page orientation; cannot benull- Throws:
NullPointerException- iforientationisnull- Since:
- 2.0
- See Also:
-
setPrintHeader
void setPrintHeader(boolean printHeader) Sets whether a header is printed on the pages.- Parameters:
printHeader-trueto print the page header,falsenot to.- Since:
- 2.0