Class PagePdf

  • All Implemented Interfaces:

    
    public class PagePdf
    
                        

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

    • 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 document
        pageIndex - 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 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
      • 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 document
        pageIndex - 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).

      • 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.