Package com.pspdfkit.document.processor
Class PagePdf
-
- All Implemented Interfaces:
public class PagePdf
Represents a PDF page to be merged onto another PDF page.
-
-
Field Summary
Fields Modifier and Type Field Description public final int
pageIndex
public final PagePosition
position
public final Matrix
matrix
public PageZOrder
zOrder
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
Modifier and Type Method Description 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. Matrix
getMatrix()
Returns a custom transformation matrix for PDF content. PageZOrder
getZOrder()
Returns the z-order of the content to be added to a page. void
setZOrder(@NonNull() PageZOrder zOrder)
Sets Z order of the PDF content when added, foreground or background. void
setDocumentPassword(@Nullable() String password)
Sets password used for opening the source PDF (if encrypted). -
-
Constructor Detail
-
PagePdf
PagePdf(Context context, Uri pdfFile)
PDF page from an existing file.- Parameters:
context
- Context of the calling component.pdfFile
- URI to file, may be a file URI or a content provider URI.
-
PagePdf
PagePdf(Context context, Uri pdfFile, PagePosition position)
PDF page from an existing file.- 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.
-
PagePdf
PagePdf(Context context, Uri pdfFile, Matrix matrix)
PDF page from an existing file.- 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).
-
PagePdf
PagePdf(Context context, DataProvider pdfDataProvider)
PDF page from a DataProvider.- Parameters:
context
- Context of the calling component.pdfDataProvider
- Data provider for the source PDF.
-
PagePdf
PagePdf(Context context, DataProvider pdfDataProvider, PagePosition position)
PDF page from a DataProvider.- Parameters:
context
- Context of the calling component.pdfDataProvider
- Data provider for the source PDF.position
- Alignment of this page contents on the target page.
-
PagePdf
PagePdf(Context context, DataProvider pdfDataProvider, Matrix matrix)
PDF page from a DataProvider.- 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
-
PagePdf
PagePdf(Context context, Uri pdfFile, int pageIndex)
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.
-
PagePdf
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.
-
PagePdf
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).
-
PagePdf
PagePdf(Context context, DataProvider pdfDataProvider, int pageIndex)
PDF page from a DataProvider.- Parameters:
context
- Context of the calling component.pdfDataProvider
- Data provider for the source PDF.pageIndex
- Index of page in the source document.
-
PagePdf
PagePdf(Context context, DataProvider pdfDataProvider, int pageIndex, PagePosition position)
PDF page from a DataProvider.- 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.
-
PagePdf
PagePdf(Context context, DataProvider pdfDataProvider, int pageIndex, Matrix matrix)
PDF page from a DataProvider.- 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
-
PagePdf
PagePdf(Context context, PdfDocument document, int pageIndex)
PDF page from an existing PdfDocument.- Parameters:
context
- Context of the calling component.document
- Source documentpageIndex
- Index of page in the source document.
-
PagePdf
PagePdf(Context context, PdfDocument document, int pageIndex, Matrix matrix)
PDF page from an existing PdfDocument.- Parameters:
context
- Context of the calling component.document
- Source documentpageIndex
- 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
-
PagePdf
PagePdf(Context context, PdfDocument document, int pageIndex, PagePosition position)
PDF page from an existing PdfDocument.- Parameters:
context
- Context of the calling component.document
- Source documentpageIndex
- Index of page in the source document.position
- Alignment of this page contents on the target page.
-
-
Method Detail
-
getPageIndex
int getPageIndex()
Returns the index of this page in the source document.
- Returns:
Index of page in the source document.
-
getPosition
@Nullable() PagePosition getPosition()
Returns the alignment of this page contents on the target page.
- Returns:
Alignment rectangle, in PDF coordinates.
-
getMatrix
@NonNull() 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).
-
getZOrder
@NonNull() PageZOrder getZOrder()
Returns the z-order of the content to be added to a page.
- Returns:
z-order of the page content, BACKGROUND or FOREGROUND.
-
setZOrder
void setZOrder(@NonNull() 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.
-
setDocumentPassword
void setDocumentPassword(@Nullable() String password)
Sets password used for opening the source PDF (if encrypted).
- Parameters:
password
- Password to be set to the document.
-
-
-
-