|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pdfbox.util.PDFStreamEngine
org.pdfbox.pdfviewer.PageDrawer
public class PageDrawer
This will paint a page in a PDF document to a graphics context.
Constructor Summary | |
---|---|
PageDrawer()
Default constructor, loads properties from file. |
Method Summary | |
---|---|
void |
drawPage(java.awt.Graphics g,
PDPage p,
java.awt.Dimension pageDimension)
This will draw the page to the requested context. |
double |
fixY(double x,
double y)
Fix the y coordinate based on page rotation. |
java.awt.Graphics2D |
getGraphics()
Get the graphics that we are currently drawing on. |
java.awt.geom.GeneralPath |
getLinePath()
Get the current line path to be drawn. |
java.util.List |
getLineSubPaths()
Get the current list of line paths to be drawn. |
java.awt.Color |
getNonStrokingColor()
Get the non stroking color. |
PDPage |
getPage()
Get the page that is currently being drawn. |
java.awt.Dimension |
getPageSize()
Get the size of the page that is currently being drawn. |
java.awt.Color |
getStrokingColor()
Get the stroking color. |
void |
setLinePath(java.awt.geom.GeneralPath newLinePath)
Set the line path to draw. |
void |
setLineSubPaths(java.util.List newLineSubPaths)
Set the list of line paths to draw. |
void |
setNonStrokingColor(java.awt.Color newNonStrokingColor)
Set the non stroking color. |
void |
setStrokingColor(java.awt.Color newStrokingColor)
Set the stroking color. |
protected void |
showCharacter(TextPosition text)
You should override this method if you want to perform an action when a string is being shown. |
Methods inherited from class org.pdfbox.util.PDFStreamEngine |
---|
getColorSpaces, getCurrentPage, getFonts, getGraphicsStack, getGraphicsState, getGraphicsStates, getResources, getTextLineMatrix, getTextMatrix, getXObjects, processOperator, processOperator, processStream, processSubStream, registerOperatorProcessor, resetEngine, setColorSpaces, setFonts, setGraphicsStack, setGraphicsState, setGraphicsStates, setTextLineMatrix, setTextMatrix, showString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PageDrawer() throws java.io.IOException
java.io.IOException
- If there is an error loading properties from the file.Method Detail |
---|
public void drawPage(java.awt.Graphics g, PDPage p, java.awt.Dimension pageDimension) throws java.io.IOException
g
- The graphics context to draw onto.p
- The page to draw.pageDimension
- The size of the page to draw.
java.io.IOException
- If there is an IO error while drawing the page.protected void showCharacter(TextPosition text)
showCharacter
in class PDFStreamEngine
text
- The string to display.public java.awt.Graphics2D getGraphics()
public PDPage getPage()
public java.awt.Dimension getPageSize()
public double fixY(double x, double y)
x
- The x coordinate.y
- The y coordinate.
public java.awt.geom.GeneralPath getLinePath()
public void setLinePath(java.awt.geom.GeneralPath newLinePath)
newLinePath
- Set the line path to draw.public java.util.List getLineSubPaths()
public void setLineSubPaths(java.util.List newLineSubPaths)
newLineSubPaths
- Set the list of line paths to draw.public java.awt.Color getNonStrokingColor()
public void setNonStrokingColor(java.awt.Color newNonStrokingColor)
newNonStrokingColor
- The non stroking color.public java.awt.Color getStrokingColor()
public void setStrokingColor(java.awt.Color newStrokingColor)
newStrokingColor
- The stroking color.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |