public class PageCounter extends Object
Modifier and Type | Field and Description |
---|---|
PageFormat |
currentPageFormat |
int |
currentPageIndex
This is only valid after calls to moveToNextPage().
|
int |
pagesInDocument
This is the total number of pages in the document as reported by
Printable.countPages()
|
int |
pagesToPrint
This is the total number of pages that will be printed using the provided
PrinterOptions object.
|
Constructor and Description |
---|
PageCounter(Handle handle,
Printable printable,
PageFormat pageFormat,
PrintOptions options) |
Modifier and Type | Method and Description |
---|---|
PageFormat |
moveToNextPage()
Call this to move to the next page - it calls validatePage() on the printable, which
may transform the original PageFormat.
|
public int pagesInDocument
public int pagesToPrint
public int currentPageIndex
public PageFormat currentPageFormat
public PageCounter(Handle handle, Printable printable, PageFormat pageFormat, PrintOptions options)
public PageFormat moveToNextPage() throws IllegalStateException
IllegalStateException