public class

PagePdf

extends Object
java.lang.Object
   ↳ com.pspdfkit.document.processor.PagePdf

Class Overview

Represents a PDF page to be merged onto another PDF page.

Summary

Public Constructors
PagePdf(Context context, Uri pdfFile)
PDF page from an existing file.
PagePdf(Context context, Uri pdfFile, PagePosition position)
PDF page from an existing file.
PagePdf(Context context, Uri pdfFile, Matrix matrix)
PDF page from an existing file.
PagePdf(Context context, DataProvider pdfDataProvider)
PDF page from a DataProvider.
PagePdf(Context context, DataProvider pdfDataProvider, PagePosition position)
PDF page from a DataProvider.
PagePdf(Context context, DataProvider pdfDataProvider, Matrix matrix)
PDF page from a DataProvider.
PagePdf(Context context, Uri pdfFile, int pageIndex)
PDF page from an existing file.
PagePdf(Context context, Uri pdfFile, int pageIndex, PagePosition position)
PDF page from an existing file.
PagePdf(Context context, Uri pdfFile, int pageIndex, Matrix matrix)
PDF page from an existing file.
PagePdf(Context context, DataProvider pdfDataProvider, int pageIndex)
PDF page from a DataProvider.
PagePdf(Context context, DataProvider pdfDataProvider, int pageIndex, PagePosition position)
PDF page from a DataProvider.
PagePdf(Context context, DataProvider pdfDataProvider, int pageIndex, Matrix matrix)
PDF page from a DataProvider.
PagePdf(Context context, PdfDocument document, int pageIndex)
PDF page from an existing PdfDocument.
PagePdf(Context context, PdfDocument document, int pageIndex, Matrix matrix)
PDF page from an existing PdfDocument.
PagePdf(Context context, PdfDocument document, int pageIndex, PagePosition position)
PDF page from an existing PdfDocument.
Public Methods
Matrix getMatrix()
Returns a custom transformation matrix for PDF content.
int getPageIndex()
Returns the index of this page in the source document.
PagePosition getPosition()
Returns the alignment of this page contents on the target page.
PageZOrder getZOrder()
Returns the z-order of the content to be added to a page.
void setDocumentPassword(String password)
Sets password used for opening the source PDF (if encrypted).
void setZOrder(PageZOrder zOrder)
Sets Z order of the PDF content when added, foreground or background.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public PagePdf (Context context, Uri pdfFile)

PDF page from an existing file. If the file has multiple pages, only first page will be used. Page will be laid out with its original size aligned to the bottom left corner of the existing page.

Parameters
context Context of the calling component.
pdfFile URI to file, may be a file URI or a content provider URI.

public PagePdf (Context context, Uri pdfFile, PagePosition position)

PDF page from an existing file. If the file has multiple pages, only first page will be used.

Parameters
context Context of the calling component.
pdfFile URI to file, may be a file URI or a content provider URI.
position Alignment of this page contents on the target page.

public PagePdf (Context context, Uri pdfFile, Matrix matrix)

PDF page from an existing file. If the file has multiple pages, only first page will be used.

Parameters
context Context of the calling component.
pdfFile URI to file, may be a file URI or a content provider URI.
matrix Custom transformation matrix for PDF content, identity matrix means alignment on bottom left at coordinate (0,0).

public PagePdf (Context context, DataProvider pdfDataProvider)

PDF page from a DataProvider. If the file has multiple pages, only first page will be used. Page will be laid out with its original size aligned to the bottom left corner of the existing page.

Parameters
context Context of the calling component.
pdfDataProvider Data provider for the source PDF.

public PagePdf (Context context, DataProvider pdfDataProvider, PagePosition position)

PDF page from a DataProvider. If the file has multiple pages, only first page will be used.

Parameters
context Context of the calling component.
pdfDataProvider Data provider for the source PDF.
position Alignment of this page contents on the target page.

public PagePdf (Context context, DataProvider pdfDataProvider, Matrix matrix)

PDF page from a DataProvider. If the file has multiple pages, only first page will be used.

Parameters
context Context of the calling component.
pdfDataProvider Data provider for the source PDF.
matrix Custom transformation matrix for PDF content, identity matrix means alignment on bottom left at coordinate 0,0

public PagePdf (Context context, Uri pdfFile, int pageIndex)

PDF page from an existing file. Page will be laid out with its original size aligned to the bottom left corner of the existing page.

Parameters
context Context of the calling component.
pdfFile URI to source document, may be a file URI or a content provider URI.
pageIndex Index of page in the source document.

public PagePdf (Context context, Uri pdfFile, int pageIndex, PagePosition position)

PDF page from an existing file.

Parameters
context Context of the calling component.
pdfFile URI to source document, may be a file URI or a content provider URI.
pageIndex Index of page in the source document.
position Alignment of this page contents on the target page.

public PagePdf (Context context, Uri pdfFile, int pageIndex, Matrix matrix)

PDF page from an existing file.

Parameters
context Context of the calling component.
pdfFile URI to source document, may be a file URI or a content provider URI.
pageIndex Index of page in the source document.
matrix Custom transformation matrix for PDF content, identity matrix means alignment on bottom left at coordinate (0,0).

public PagePdf (Context context, DataProvider pdfDataProvider, int pageIndex)

PDF page from a DataProvider. Page will be laid out with its original size aligned to the bottom left corner of the existing page.

Parameters
context Context of the calling component.
pdfDataProvider Data provider for the source PDF.
pageIndex Index of page in the source document.

public PagePdf (Context context, DataProvider pdfDataProvider, int pageIndex, PagePosition position)

PDF page from a DataProvider. If the file has multiple pages, only first page will be used.

Parameters
context Context of the calling component.
pdfDataProvider Data provider for the source PDF.
pageIndex Index of page in the source document.
position Alignment of this page contents on the target page.

public PagePdf (Context context, DataProvider pdfDataProvider, int pageIndex, Matrix matrix)

PDF page from a DataProvider. If the file has multiple pages, only first page will be used.

Parameters
context Context of the calling component.
pdfDataProvider Data provider for the source PDF.
pageIndex Index of page in the source document.
matrix Custom transformation matrix for PDF content, identity matrix means alignment on bottom left at coordinate 0,0

public PagePdf (Context context, PdfDocument document, int pageIndex)

PDF page from an existing PdfDocument. Page will be laid out with its original size aligned to the bottom left corner of the existing page.

Parameters
context Context of the calling component.
document Source document
pageIndex Index of page in the source document.

public PagePdf (Context context, PdfDocument document, int pageIndex, Matrix matrix)

PDF page from an existing PdfDocument.

Parameters
context Context of the calling component.
document Source document
pageIndex Index of page in the source document.
matrix Custom transformation matrix for PDF content, identity matrix means alignment on bottom left at coordinate 0,0

public PagePdf (Context context, PdfDocument document, int pageIndex, PagePosition position)

PDF page from an existing PdfDocument.

Parameters
context Context of the calling component.
document Source document
pageIndex Index of page in the source document.
position Alignment of this page contents on the target page.

Public Methods

public Matrix getMatrix ()

Returns a custom transformation matrix for PDF content.

Returns
  • Custom transformation matrix for PDF content, identity matrix means alignment on bottom left at coordinate (0,0).

public int getPageIndex ()

Returns the index of this page in the source document.

Returns
  • Index of page in the source document.

public PagePosition getPosition ()

Returns the alignment of this page contents on the target page.

Returns
  • Alignment rectangle, in PDF coordinates.

public PageZOrder getZOrder ()

Returns the z-order of the content to be added to a page.

Returns

public void setDocumentPassword (String password)

Sets password used for opening the source PDF (if encrypted).

Parameters
password Password to be set to the document.

public void setZOrder (PageZOrder zOrder)

Sets Z order of the PDF content when added, foreground or background.

Parameters
zOrder z-odder of the PDF content when added, BACKGROUND or FOREGROUND.