public interface PageRange
Modifier and Type | Method and Description |
---|---|
default int |
from()
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.
|
static PageRange of(int from, int to)
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.
from
- the 1-based number of the first page within the rangeto
- the 1-based number of the last page within the rangejava.lang.IllegalArgumentException
- if from
is greater than to
java.lang.IllegalArgumentException
- if from
is less than onedefault int from()
default int to()