|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pdfbox.util.PDFStreamEngine
org.pdfbox.util.PDFTextStripper
at.knowcenter.wag.egov.egiz.pdf.PDFPage
public class PDFPage
PDFPage is an inner class that is used to calculate the page length of a PDF
Document page. It extends the PDFTextStripper class and implement one
interested method: showCharacter(TextPosition)
This method is called when processing the FileStream. By calling the method
PDFStreamEngine.processStream(org.pdfbox.pdmodel.PDPage, org.pdfbox.pdmodel.PDResources, org.pdfbox.cos.COSStream)
the implemented method showCharacter is called.
PDFTextStripper| Nested Class Summary | |
|---|---|
class |
PDFPage.MyInvoke
|
| Nested classes/interfaces inherited from class org.pdfbox.util.PDFStreamEngine |
|---|
PDFStreamEngine.StreamResources |
| Field Summary | |
|---|---|
protected float |
footer_line
The y coordinate of the footer line. |
protected float |
max_character_ypos
The maximum (lowest) y position of a character. |
protected float |
max_image_ypos
The maximum (lowest y position of an image. |
| Fields inherited from class org.pdfbox.util.PDFTextStripper |
|---|
charactersByArticle, output |
| Fields inherited from class org.pdfbox.util.PDFStreamEngine |
|---|
fontToAverageWidths, graphicsStack, operators, page, SPACE_BYTES, streamResourcesStack, textLineMatrix, textMatrix |
| Constructor Summary | |
|---|---|
PDFPage(float footer_line)
Constructor. |
|
| Method Summary | |
|---|---|
static float |
findMaxX(Pos[] coordinates)
|
static float |
findMinX(Pos[] coordinates)
|
static float |
findMinY(Pos[] coordinates)
|
float |
getMaxPageLength()
Returns the calculated page length. |
protected void |
processOperator(PDFOperator operator,
List arguments)
This is used to handle an operation. |
protected void |
showCharacter(TextPosition text)
A method provided as an event interface to allow a subclass to perform some specific functionality when a character needs to be displayed. |
static Pos |
transtormCoordinate(Pos pos,
Matrix m)
|
static Pos[] |
transtormCoordinates(Pos[] coordinates,
Matrix m)
|
| Methods inherited from class org.pdfbox.util.PDFStreamEngine |
|---|
getColorSpaces, getCurrentPage, getFonts, getGraphicsStack, getGraphicsState, getGraphicsStates, getResources, getTextLineMatrix, getTextMatrix, getXObjects, processOperator, processStream, processSubStream, 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 |
| Field Detail |
|---|
protected float max_character_ypos
protected float max_image_ypos
protected float footer_line
| Constructor Detail |
|---|
public PDFPage(float footer_line)
throws IOException
footer_line - The y coordinate of the footer line. PDF elements below this footer line will not be regarded.
IOException| Method Detail |
|---|
protected void processOperator(PDFOperator operator,
List arguments)
throws IOException
PDFStreamEngine
processOperator in class PDFStreamEngineoperator - The operation to perform.arguments - The list of arguments.
IOException - If there is an error processing the operation.protected void showCharacter(TextPosition text)
showCharacter in class PDFTextStrippertext - the character to be displayed -> calculate there y position.public float getMaxPageLength()
public static Pos[] transtormCoordinates(Pos[] coordinates,
Matrix m)
public static Pos transtormCoordinate(Pos pos,
Matrix m)
public static float findMinY(Pos[] coordinates)
public static float findMaxX(Pos[] coordinates)
public static float findMinX(Pos[] coordinates)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||