public final class

PageTemplate

extends Object
java.lang.Object
   ↳ com.pspdfkit.document.editor.page.PageTemplate

Class Overview

Can be used with DialogNewPageFactory and NewPageDialog to provide additional templates for the user to choose when creating new pages.

Summary

Public Constructors
PageTemplate(PdfDocument sourceDocument, int pageIndex, String templateName, Drawable previewImage)
Creates a new PageTemplate from existing document page.
PageTemplate(PagePattern pagePattern, String templateName, Drawable previewImage)
Creates a new PageTemplate from page tiling pattern.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public PageTemplate (PdfDocument sourceDocument, int pageIndex, String templateName, Drawable previewImage)

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
sourceDocument The document to use to create the new page.
pageIndex The page of the source document to use for the new page.
templateName Title shown to the user when selecting the page template
previewImage Preview image shown to the user when selecting a new page template. Should be 100x100dp.

public PageTemplate (PagePattern pagePattern, String templateName, Drawable previewImage)

Creates a new PageTemplate from page tiling pattern.

Parameters
pagePattern Tiled Page pattern to use to create new page.
templateName Title shown to the user when selecting the page template
previewImage Preview image shown to the user when selecting a new page template. Should be 100x100dp.