Class NewPage

  • All Implemented Interfaces:

    
    public final class NewPage
    
                        

    Settings for new page to be added to a PDF. Instances of this class are immutable and can be generated using the Builder.

    • Constructor Detail

    • Method Detail

      • fromPage

        @NonNull() static NewPage.Builder fromPage(@NonNull() PdfDocument sourceDocument, int pageIndex)

        Copies page from a source document.

        Parameters:
        sourceDocument - Document to copy page from.
        pageIndex - Index of page in the source document.
      • getNativeNewPageConfiguration

        @NonNull() NativeNewPageConfiguration getNativeNewPageConfiguration()

        Returns native NewPageConfiguration object. Note that it runs image loading and conversion so it shouldn't be called on the main thread.

      • hasPdfPageSource

         boolean hasPdfPageSource()

        Used to determine whether new page was created using PDF document as its source. Keep in mind that having both PDF document and pattern as a source of a new page isn't possible.

        Returns:

        true if page was created using PDF document source (this will be the case when using page templates) and false otherwise.

      • hasPatternSource

         boolean hasPatternSource()

        Used to determine whether new page was created using pattern. Keep in mind that having both PDF document and pattern as a source of a new page isn't possible.

        Returns:

        true if page was created using pattern source and false otherwise.