Package com.pspdfkit.document.processor
Class NewPage.Builder
-
- All Implemented Interfaces:
public class NewPage.Builder
Builder for NewPage objects.
-
-
Method Summary
Modifier and Type Method Description NewPage.Builder
withMargins(@NonNull() RectF margins)
Sets page margins in PDF points. NewPage.Builder
rotation(int rotation)
Rotates the page. NewPage.Builder
backgroundColor(@ColorInt() int backgroundColor)
Sets background color for the page. NewPage.Builder
withPageItem(@NonNull() PageImage image)
Adds an image to this page. NewPage.Builder
withPageItem(@NonNull() PagePdf pdf)
Merges content of another PDF page to this page. NewPage.Builder
withPageItem(@NonNull() PageCanvas canvas)
Merges content of canvas drawing to this page. NewPage
build()
Creates a NewPage object. -
-
Method Detail
-
withMargins
@NonNull() NewPage.Builder withMargins(@NonNull() RectF margins)
Sets page margins in PDF points.
- Parameters:
margins
- Rect representing page margins.
-
rotation
@NonNull() NewPage.Builder rotation(int rotation)
Rotates the page.
- Parameters:
rotation
- Rotation of the page, valid values are 0, 90, 180 or 270.
-
backgroundColor
@NonNull() NewPage.Builder backgroundColor(@ColorInt() int backgroundColor)
Sets background color for the page.
- Parameters:
backgroundColor
- Background color, default isColor#TRANSPARENT
which is rendered white on most renderers.
-
withPageItem
@NonNull() NewPage.Builder withPageItem(@NonNull() PageImage image)
Adds an image to this page. Only one page item can be added at a time.
- Parameters:
image
- Image to be added to the page.
-
withPageItem
@NonNull() NewPage.Builder withPageItem(@NonNull() PagePdf pdf)
Merges content of another PDF page to this page. Only one page item can be added at a time.
- Parameters:
pdf
- Page to be merged onto this page.
-
withPageItem
@NonNull() NewPage.Builder withPageItem(@NonNull() PageCanvas canvas)
Merges content of canvas drawing to this page. Only one page item can be added at a time.
- Parameters:
canvas
- Page canvas to be merged onto this page.
-
-
-
-