public class PageBox extends Object
| Constructor and Description |
|---|
PageBox() |
| Modifier and Type | Method and Description |
|---|---|
void |
exportLeadingText(RenderingContext c,
Writer writer) |
void |
exportTrailingText(RenderingContext c,
Writer writer) |
int |
getBasePagePdfPageIndex() |
int |
getBottom()
Gets the document Y position in top down units (20 per CSS pixel for PDF)
Example: If each page is 500px high and has a 50px margin, then if this is called on the second page it will return 16_000, which is 2 x 400px x 20. |
int |
getBottom(CssContext c)
If we are in a footnote calls
getBottom(), otherwise uses
getBottomUsable(). |
int |
getBottomUsable()
Gets the document Y position taking into account
float: bottom
content such as footnotes. |
int |
getContentHeight(CssContext cssCtx) |
int |
getContentWidth(CssContext cssCtx) |
MarginBoxName[] |
getCurrentMarginBoxNames() |
IdentValue |
getCutOffPageDirection() |
Rectangle |
getDocumentCoordinatesContentBounds(CssContext c)
Get the rectangle that this page's content area will cover of the layed out document.
|
Rectangle |
getDocumentCoordinatesContentBoundsForInsertedPage(CssContext c,
int shadowPageNumber)
Get the shadow page (a page inserted to carry cut off content) content area of the layed out document.
|
int |
getFootnoteAreaHeight()
|
float |
getFootnoteMaxHeight(CssContext c)
Gets the footnote area max-height if it is provided
in the footnote at-rule for this page, otherwise -1.
|
int |
getHeight(CssContext cssCtx) |
RectPropertySet |
getMargin(CssContext cssCtx) |
int |
getMarginBorderPadding(CssContext cssCtx,
int which) |
int |
getMaxInsertedPages()
The maximum number of shadow pages to insert for cut-off content.
|
int |
getMaxShadowPagesForXPos(CssContext c,
int x)
Returns the number of shadow pages needed for a given x coordinate.
|
Element |
getMetadata() |
int |
getOuterPageWidth() |
Rectangle |
getPagedViewClippingBounds(CssContext cssCtx,
int additionalClearance) |
PageInfo |
getPageInfo() |
int |
getPageNo() |
int |
getPaintingBottom() |
int |
getPaintingTop()
Example: If a page is 100 units high and has a 10 unit margin,
this will return 0 for the first page and 80 for the second and so on.
|
Rectangle |
getPrintClippingBounds(CssContext cssCtx) |
Rectangle |
getPrintPaintingBounds(CssContext cssCtx) |
Rectangle |
getScreenPaintingBounds(CssContext cssCtx,
int additionalClearance) |
int |
getShadowPageCount() |
CalculatedStyle |
getStyle() |
int |
getTop()
Get the document Y index into this page.
|
int |
getWidth(CssContext cssCtx) |
boolean |
isFootnoteReserved(CssContext c)
If this page is reserved for footnote content.
|
boolean |
isLeftPage() |
boolean |
isRightPage() |
void |
layout(LayoutContext c) |
void |
paintBackground(RenderingContext c,
int additionalClearance,
short mode) |
void |
paintBorder(RenderingContext c,
int additionalClearance,
short mode) |
void |
paintMarginAreas(RenderingContext c,
int additionalClearance,
short mode) |
void |
setBasePagePdfPageIndex(int idx) |
void |
setFootnoteAreaHeight(int footnoteAreaHeight)
Sets the footnote area height on this page.
|
void |
setOuterPageWidth(int containingBlockWidth) |
void |
setPageInfo(PageInfo pageInfo) |
void |
setPageNo(int pageNo) |
void |
setPaintingBottom(int paintingBottom) |
void |
setPaintingTop(int paintingTop) |
void |
setShadowPageCount(int cnt) |
void |
setStyle(CalculatedStyle style) |
void |
setTopAndBottom(CssContext cssCtx,
int top) |
boolean |
shouldInsertPages()
Should shadow pages be inserted for cut off content for this page.
|
public void setBasePagePdfPageIndex(int idx)
public void setShadowPageCount(int cnt)
public int getBasePagePdfPageIndex()
public int getShadowPageCount()
public int getWidth(CssContext cssCtx)
public int getHeight(CssContext cssCtx)
public int getContentHeight(CssContext cssCtx)
public int getContentWidth(CssContext cssCtx)
public CalculatedStyle getStyle()
public void setStyle(CalculatedStyle style)
public int getBottom()
float: bottom
content. For this, you can use getBottomUsable().
getBottom(CssContext) over this method.public int getBottomUsable()
float: bottom
content such as footnotes. When laying in-flow content we use this method
while when in footnotes we use getBottom().
getBottom(CssContext) over this method.public int getBottom(CssContext c)
getBottom(), otherwise uses
getBottomUsable().public boolean isFootnoteReserved(CssContext c)
public int getFootnoteAreaHeight()
public void setFootnoteAreaHeight(int footnoteAreaHeight)
public int getTop()
getBottom() for example.public void setTopAndBottom(CssContext cssCtx, int top)
public int getPaintingBottom()
public void setPaintingBottom(int paintingBottom)
public int getPaintingTop()
public void setPaintingTop(int paintingTop)
public Rectangle getScreenPaintingBounds(CssContext cssCtx, int additionalClearance)
public Rectangle getPrintPaintingBounds(CssContext cssCtx)
public Rectangle getDocumentCoordinatesContentBounds(CssContext c)
public Rectangle getDocumentCoordinatesContentBoundsForInsertedPage(CssContext c, int shadowPageNumber)
public int getMaxShadowPagesForXPos(CssContext c, int x)
public boolean shouldInsertPages()
public int getMaxInsertedPages()
public IdentValue getCutOffPageDirection()
public Rectangle getPagedViewClippingBounds(CssContext cssCtx, int additionalClearance)
public Rectangle getPrintClippingBounds(CssContext cssCtx)
public RectPropertySet getMargin(CssContext cssCtx)
public void paintBorder(RenderingContext c, int additionalClearance, short mode)
public void paintBackground(RenderingContext c, int additionalClearance, short mode)
public void paintMarginAreas(RenderingContext c, int additionalClearance, short mode)
public MarginBoxName[] getCurrentMarginBoxNames()
public int getPageNo()
public void setPageNo(int pageNo)
public int getOuterPageWidth()
public void setOuterPageWidth(int containingBlockWidth)
public int getMarginBorderPadding(CssContext cssCtx, int which)
public PageInfo getPageInfo()
public void setPageInfo(PageInfo pageInfo)
public Element getMetadata()
public void layout(LayoutContext c)
public boolean isLeftPage()
public boolean isRightPage()
public void exportLeadingText(RenderingContext c, Writer writer) throws IOException
IOExceptionpublic void exportTrailingText(RenderingContext c, Writer writer) throws IOException
IOExceptionpublic float getFootnoteMaxHeight(CssContext c)
Copyright © 2004–2025. All rights reserved.