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 Details

    • getFooterCenter

      String getFooterCenter()
      Returns the text of the footer printed in the center of the pages.
      Returns:
      the center footer text
      Since:
      2.0
    • getFooterLeft

      String getFooterLeft()
      Returns the text of the footer printed on the left of the pages.
      Returns:
      the left footer text
      Since:
      2.0
    • getFooterRight

      String getFooterRight()
      Returns the text of the footer printed on the right of the pages.
      Returns:
      the right footer text
      Since:
      2.0
    • 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 by getMarginUnit().
      Returns:
      the bottom margin
      Since:
      2.0
    • getMarginLeft

      float getMarginLeft()
      Returns the left margin of the page, in the unit returned by getMarginUnit().
      Returns:
      the left margin
      Since:
      2.0
    • getMarginRight

      float getMarginRight()
      Returns the right margin of the page, in the unit returned by getMarginUnit().
      Returns:
      the right margin
      Since:
      2.0
    • getMarginTop

      float getMarginTop()
      Returns the top margin of the page, in the unit returned by getMarginUnit().
      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, either PageOrientation.PORTRAIT or PageOrientation.LANDSCAPE.
      Returns:
      the page orientation
      Since:
      2.0
    • getPrintFooter

      boolean getPrintFooter()
      Answers whether a footer is printed on the pages.
      Returns:
      true if printed pages will have a footer; false, otherwise
      Since:
      2.0
    • getPrintHeader

      boolean getPrintHeader()
      Answers whether a header is printed on the pages.
      Returns:
      true if printed pages will have a header; false, otherwise
      Since:
      2.0
    • setMarginUnit

      void setMarginUnit(MarginUnit pageUnit)
      Sets the unit the page margins are measured in.
      Parameters:
      pageUnit - the unit of the page margins; cannot be null
      Throws:
      NullPointerException - if pageUnit is null
      Since:
      2.0
    • setOrientation

      void setOrientation(PageOrientation orientation)
      Sets the orientation of the printed pages.
      Parameters:
      orientation - the page orientation; cannot be null
      Throws:
      NullPointerException - if orientation is null
      Since:
      2.0
      See Also:
    • setPrintFooter

      void setPrintFooter(boolean printFooter)
      Sets whether a footer is printed on the pages.
      Parameters:
      printFooter - true to print the page footer, false not to.
      Since:
      2.0
    • setPrintHeader

      void setPrintHeader(boolean printHeader)
      Sets whether a header is printed on the pages.
      Parameters:
      printHeader - true to print the page header, false not to.
      Since:
      2.0