Dividable.Divided| Constructor and Description |
|---|
VerticalSpacer(float height)
Creates a vertical space with the given height.
|
| Modifier and Type | Method and Description |
|---|---|
Dividable.Divided |
divide(float remainingHeight,
float pageHeight)
Divides the drawable vetically into pieces where the first part is to
respect the given remaining height.
|
void |
draw(org.apache.pdfbox.pdmodel.PDDocument pdDocument,
org.apache.pdfbox.pdmodel.PDPageContentStream contentStream,
Position upperLeft,
DrawListener drawListener)
Draws the object at the given position.
|
Position |
getAbsolutePosition()
If an absolute position is given, the drawable will be drawn at this
position ignoring any
Layout. |
float |
getHeight() |
float |
getWidth() |
Drawable |
removeLeadingEmptyVerticalSpace() |
public VerticalSpacer(float height)
height - the height of the space.public float getWidth()
throws IOException
getWidth in interface DrawableIOException - by pdfboxpublic float getHeight()
throws IOException
getHeight in interface DrawableIOException - by pdfboxpublic Position getAbsolutePosition()
DrawableLayout.getAbsolutePosition in interface Drawablepublic void draw(org.apache.pdfbox.pdmodel.PDDocument pdDocument,
org.apache.pdfbox.pdmodel.PDPageContentStream contentStream,
Position upperLeft,
DrawListener drawListener)
throws IOException
Drawabledraw in interface DrawablepdDocument - the underlying pdfbox document.contentStream - the stream to draw to.upperLeft - the upper left position to start drawing.drawListener - the listener to
notify on
drawn objects.IOException - by pdfboxpublic Dividable.Divided divide(float remainingHeight, float pageHeight) throws IOException
Dividabledivide in interface DividableremainingHeight - the remaining height on the page dictating the height of the
first part.pageHeight - the height of the next page allows to make better decisions on
how to divide best, e.g. maybe the element fits completely on
the next page.IOException - by pdfbox.public Drawable removeLeadingEmptyVerticalSpace()
removeLeadingEmptyVerticalSpace in interface DrawableCopyright © 2022. All rights reserved.