Package com.helger.pdflayout.render
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 Summary
Constructors Constructor Description PagePreRenderContext(PLPageSet aPageSet, org.apache.pdfbox.pdmodel.PDDocument aDoc, org.apache.pdfbox.pdmodel.PDPage aPage, int nPageSetIndex, int nPageSetCount, int nPageSetPageIndex, int nPageSetPageCount, int nTotalPageIndex, int nTotalPageCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPlaceholder(String sKey, int nValue)voidaddPlaceholder(String sKey, String sValue)com.helger.commons.collection.impl.ICommonsOrderedMap<String,String>getAllPlaceholders()org.apache.pdfbox.pdmodel.PDDocumentgetDocument()org.apache.pdfbox.pdmodel.PDPagegetPage()PLPageSetgetPageSet()intgetPageSetCount()intgetPageSetIndex()intgetPageSetNumber()intgetPageSetPageCount()intgetPageSetPageIndex()intgetPageSetPageNumber()StringgetPlaceholder(String sKey)intgetPlaceholderAsInt(String sKey, int nDefault)intgetTotalPageCount()intgetTotalPageIndex()intgetTotalPageNumber()StringtoString()
-
-
-
Constructor Detail
-
PagePreRenderContext
public PagePreRenderContext(@Nonnull PLPageSet aPageSet, @Nonnull org.apache.pdfbox.pdmodel.PDDocument aDoc, @Nonnull org.apache.pdfbox.pdmodel.PDPage aPage, @Nonnegative int nPageSetIndex, @Nonnegative int nPageSetCount, @Nonnegative int nPageSetPageIndex, @Nonnegative int nPageSetPageCount, @Nonnegative int nTotalPageIndex, @Nonnegative int nTotalPageCount)
-
-
Method Detail
-
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()
-
-