org.apache.pdfbox.examples.util
Class PrintTextLocations
java.lang.Object
org.apache.pdfbox.util.PDFStreamEngine
org.apache.pdfbox.util.PDFTextStripper
org.apache.pdfbox.examples.util.PrintTextLocations
public class PrintTextLocations
- extends PDFTextStripper
This is an example on how to get some x/y coordinates of text.
Usage: java org.apache.pdfbox.examples.util.PrintTextLocations <input-pdf>
- Version:
- $Revision: 1.7 $
- Author:
- Ben Litchfield
|
Method Summary |
static void |
main(String[] args)
This will print the documents data. |
protected void |
processTextPosition(TextPosition text)
A method provided as an event interface to allow a subclass to perform
some specific functionality when text needs to be processed. |
| Methods inherited from class org.apache.pdfbox.util.PDFTextStripper |
endArticle, endDocument, endPage, getAverageCharTolerance, getCharactersByArticle, getCurrentPageNo, getEndBookmark, getEndPage, getLineSeparator, getOutput, getPageSeparator, getSpacingTolerance, getStartBookmark, getStartPage, getText, getText, getWordSeparator, inspectFontEncoding, processPage, processPages, resetEngine, setAverageCharTolerance, setEndBookmark, setEndPage, setLineSeparator, setPageSeparator, setShouldSeparateByBeads, setSortByPosition, setSpacingTolerance, setStartBookmark, setStartPage, setSuppressDuplicateOverlappingText, setWordSeparator, shouldSeparateByBeads, shouldSortByPosition, shouldSuppressDuplicateOverlappingText, startArticle, startArticle, startDocument, startPage, writeCharacters, writeLineSeparator, writePage, writePageSeperator, writeString, writeText, writeText, writeWordSeparator |
| Methods inherited from class org.apache.pdfbox.util.PDFStreamEngine |
getColorSpaces, getCurrentPage, getFonts, getGraphicsStack, getGraphicsState, getGraphicsStates, getResources, getTextLineMatrix, getTextMatrix, getTotalCharCnt, getValidCharCnt, getXObjects, processEncodedText, processOperator, processOperator, processStream, processSubStream, registerOperatorProcessor, setColorSpaces, setFonts, setGraphicsStack, setGraphicsState, setGraphicsStates, setTextLineMatrix, setTextMatrix |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrintTextLocations
public PrintTextLocations()
throws IOException
- Default constructor.
- Throws:
IOException - If there is an error loading text stripper properties.
main
public static void main(String[] args)
throws Exception
- This will print the documents data.
- Parameters:
args - The command line arguments.
- Throws:
Exception - If there is an error parsing the document.
processTextPosition
protected void processTextPosition(TextPosition text)
- A method provided as an event interface to allow a subclass to perform
some specific functionality when text needs to be processed.
- Overrides:
processTextPosition in class PDFTextStripper
- Parameters:
text - The text to be processed
Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.