Dividable.Divided| Modifier | Constructor and Description |
|---|---|
|
Cutter(Drawable undividableElement) |
protected |
Cutter(Drawable undividable,
float viewPortY,
float viewPortHeight) |
| 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 Cutter(Drawable undividableElement) throws IOException
IOExceptionprotected Cutter(Drawable undividable, float viewPortY, float viewPortHeight)
public Dividable.Divided divide(float remainingHeight, float pageHeight)
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.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 Drawable removeLeadingEmptyVerticalSpace() throws IOException
removeLeadingEmptyVerticalSpace in interface DrawableIOException - by pdfboxCopyright © 2022. All rights reserved.