public class RenderUtilKt
Modifier and Type | Method and Description |
---|---|
static void |
drawBox(Document document,
org.apache.pdfbox.pdmodel.PDDocument pdDocument,
float startX,
float endX,
float startY,
float endY,
java.awt.Color color)
Draws the box whose opposite corners are (startX, startY) and (endX, endY). The box must
not cross page boundaries.
|
static void |
drawLine(Document document,
org.apache.pdfbox.pdmodel.PDDocument pdDocument,
float startX,
float startY,
float endX,
float endY,
float width,
java.awt.Color color)
Draws a line from (startX, startY) to (endX, endY) with given color and width. The line must
not cross page boundaries.
|
static org.apache.pdfbox.pdmodel.PDPage |
getPage(Document document,
org.apache.pdfbox.pdmodel.PDDocument pdDocument,
float endY)
Safely gets (or creates) the page containing endY
|
static int |
getPageIndex(float pageHeight,
float y) |
static float |
transformY(Document document,
float y)
Transforms endY from pdf-builder space to Apache pdf-box space (relative
to bottom of current page).
|
public static void drawLine(Document document, org.apache.pdfbox.pdmodel.PDDocument pdDocument, float startX, float startY, float endX, float endY, float width, java.awt.Color color)
Draws a line from (startX, startY) to (endX, endY) with given color and width. The line must not cross page boundaries.
public static void drawBox(Document document, org.apache.pdfbox.pdmodel.PDDocument pdDocument, float startX, float endX, float startY, float endY, java.awt.Color color)
Draws the box whose opposite corners are (startX, startY) and (endX, endY). The box must not cross page boundaries.
public static int getPageIndex(float pageHeight, float y)
public static org.apache.pdfbox.pdmodel.PDPage getPage(Document document, org.apache.pdfbox.pdmodel.PDDocument pdDocument, float endY)
Safely gets (or creates) the page containing endY
public static float transformY(Document document, float y)
Transforms endY from pdf-builder space to Apache pdf-box space (relative to bottom of current page).