Page Template
constructor(@NonNull sourceDocument: PdfDocument, @IntRange(from = 0 ) pageIndex: Int, @NonNull templateName: String, @Nullable previewImage: Drawable)
Creates a new PageTemplate from existing document page. The page templates created form existing pages can't be customized by the user (size, orientation, page color) and are added to the document exactly as is.
Parameters
source Document
The document to use to create the new page.
page Index
The page of the source document to use for the new page.
template Name
Title shown to the user when selecting the page template
preview Image
Preview image shown to the user when selecting a new page template. Should be 100x100dp.
constructor(@NonNull pagePattern: PagePattern, @NonNull templateName: String, @Nullable previewImage: Drawable)
Creates a new PageTemplate from page tiling pattern.
Parameters
page Pattern
Tiled Page pattern to use to create new page.
template Name
Title shown to the user when selecting the page template
preview Image
Preview image shown to the user when selecting a new page template. Should be 100x100dp.