Class PagePreRenderContext

java.lang.Object
com.helger.pdflayout.render.PagePreRenderContext

@Immutable public class PagePreRenderContext extends Object
This class describes the index of the current page.
Author:
Philip Helger
  • Constructor Details

  • Method Details

    • getPageSet

      @Nonnull public PLPageSet getPageSet()
      Returns:
      the document
    • getDocument

      @Nonnull public org.apache.pdfbox.pdmodel.PDDocument getDocument()
      Returns:
      the PDFBox document
    • getPage

      @Nonnull public org.apache.pdfbox.pdmodel.PDPage getPage()
      Returns:
      the new PDFBox page
    • getPageSetIndex

      @Nonnegative public int getPageSetIndex()
      Returns:
      The index of the current page set. 0-based. Always ≥ 0.
    • getPageSetNumber

      @Nonnegative public int getPageSetNumber()
      Returns:
      The number of the current page set. 1-based. Always ≥ 1.
    • getPageSetCount

      @Nonnegative public int getPageSetCount()
      Returns:
      The total number of page sets. Always ≥ 1.
    • getPageSetPageIndex

      @Nonnegative public int getPageSetPageIndex()
      Returns:
      The index of the page in the current page set. 0-based. Always ≥ 0.
    • getPageSetPageNumber

      @Nonnegative public int getPageSetPageNumber()
      Returns:
      The number of the page in the current page set. 1-based. Always ≥ 1.
    • getPageSetPageCount

      @Nonnegative public int getPageSetPageCount()
      Returns:
      The total number of pages in the current page set. Always ≥ 0.
    • getTotalPageIndex

      @Nonnegative public int getTotalPageIndex()
      Returns:
      The index of the page over all page sets. 0-based. Always ≥ 0.
    • getTotalPageNumber

      @Nonnegative public int getTotalPageNumber()
      Returns:
      The number of the page over all page sets. 1-based. Always ≥ 1.
    • getTotalPageCount

      @Nonnegative public int getTotalPageCount()
      Returns:
      The overall number of pages. Always ≥ 0.
    • getAllPlaceholders

      @Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsOrderedMap<String,String> getAllPlaceholders()
    • getPlaceholder

      @Nullable public String getPlaceholder(@Nullable String sKey)
    • getPlaceholderAsInt

      public int getPlaceholderAsInt(@Nullable String sKey, int nDefault)
    • addPlaceholder

      public void addPlaceholder(@Nonnull @Nonempty String sKey, int nValue)
    • addPlaceholder

      public void addPlaceholder(@Nonnull @Nonempty String sKey, @Nonnull String sValue)
    • toString

      public String toString()
      Overrides:
      toString in class Object