| java.lang.Object | |
| ↳ | com.pspdfkit.document.processor.NewPage |
Settings for new page to be added to a PDF. Instances of this class are immutable and can be generated using the NewPage.Builder.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| class | NewPage.Builder | Builder for NewPage objects. |
|||||||||
| interface | NewPage.OnDrawCanvasCallback | Callback passed to fromCanvas(Size, OnDrawCanvasCallback) to perform the drawing on the document canvas. |
|||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| public static final Size | PAGE_SIZE_A0 | Standard A0 841x1189mm size. | |||||||||
| public static final Size | PAGE_SIZE_A4 | Standard A4 210x297mm size. | |||||||||
| public static final Size | PAGE_SIZE_A5 | Standard A5 148x210mm size. | |||||||||
| public static final Size | PAGE_SIZE_B4 | Standard B4 250x353mm size. | |||||||||
| public static final Size | PAGE_SIZE_B5 | Standard B5 176x250mm size. | |||||||||
| public static final Size | PAGE_SIZE_US_LEGAL | Standard US letter 8.5x11" size. | |||||||||
| public static final Size | PAGE_SIZE_US_LETTER | Standard US legal 8.5x14" size. | |||||||||
| public final int | backgroundColor | ||||||||||
| public final EdgeInsets | margins | ||||||||||
| public final Size | pageSize | ||||||||||
| public final int | rotation | ||||||||||
| public final InternalPdfDocument | sourceDocument | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static NewPage.Builder |
emptyPage(Size pageSize)
Creates a new empty page.
| ||||||||||
| static NewPage.Builder |
fromCanvas(Size pageSize, NewPage.OnDrawCanvasCallback callback)
Creates a new page from a
Canvas holding all the draw calls. | ||||||||||
| static NewPage.Builder |
fromPage(PdfDocument sourceDocument, int pageIndex)
Copies page from a source document.
| ||||||||||
| static NewPage.Builder |
patternPage(Size pageSize, PagePattern pattern)
Creates a new page with a preset pattern.
| ||||||||||
| String | toString() | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Creates a new empty page.
| pageSize | Page size in PDF points. |
|---|
Creates a new page from a Canvas holding all the draw calls.
| pageSize | Page size in PDF points. |
|---|---|
| callback | An NewPage.OnDrawCanvasCallback that should be called to perform the drawing on the canvas.
|
Copies page from a source document.
| sourceDocument | Document to copy page from. |
|---|---|
| pageIndex | Index of page in the source document. |
Creates a new page with a preset pattern.
| pageSize | Page size in PDF points. |
|---|---|
| pattern | Pattern on the page. |