Interface PageRange


public interface PageRange
A page range to be printed.
Since:
7.13
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    Returns the number of the first page within the range.
    static PageRange
    of(int from, int to)
    Creates a new page range instance.
    default int
    to()
    Returns the number of the last page within the range.
  • Method Details

    • of

      static PageRange of(int from, int to)
      Creates a new page range instance.

      Page ranges must not exceed the total page count received with the PageCountUpdated event. An attempt to print a document with invalid page ranges will result in cancelling the current printing operation.

      Parameters:
      from - the 1-based number of the first page within the range
      to - the 1-based number of the last page within the range
      Throws:
      IllegalArgumentException - if from is greater than to
      IllegalArgumentException - if from is less than one
    • from

      default int from()
      Returns the number of the first page within the range.
    • to

      default int to()
      Returns the number of the last page within the range.