Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfbox.examples.util
Class PrintTextLocations

    java.lang.Object
      org.pdfbox.util.PDFStreamEngine
          org.pdfbox.util.PDFTextStripper
              org.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.pdfbox.examples.util.PrintTextLocations <input-pdf>

Version:
  $Revision: 1.1 $
Author:
  Ben Litchfield (ben@benlitchfield.com)

Field Summary

Fields inherited from class org.pdfbox.util.PDFTextStripper
`output`

Constructor Summary
`PrintTextLocations()` Default constructor.

Method Summary
`static void` | `main(String[] args)` This will print the documents data.
`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.

Methods inherited from class org.pdfbox.util.PDFTextStripper
`endDocument, endPage, endParagraph, flushText, getCharactersByArticle, getCurrentPage, getCurrentPageNo, getEndBookmark, getEndPage, getLineSeparator, getOutput, getPageSeparator, getStartBookmark, getStartPage, getText, getText, getWordSeparator, processPage, processPages, setEndBookmark, setEndPage, setLineSeparator, setPageSeparator, setShouldSeparateByBeads, setStartBookmark, setStartPage, setSuppressDuplicateOverlappingText, setWordSeparator, shouldSeparateByBeads, shouldSuppressDuplicateOverlappingText, startDocument, startPage, startParagraph, writeCharacters, writeText, writeText`

Methods inherited from class org.pdfbox.util.PDFStreamEngine
`getColorSpaces, getFonts, getGraphicsStack, getGraphicsState, getGraphicsStates, getResources, getTextLineMatrix, getTextMatrix, processOperator, 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`

Constructor Detail

### PrintTextLocations

    public PrintTextLocations()
                       throws IOException

  Default constructor.

Throws:
  `IOException` - If there is an error loading text stripper properties.

Method Detail

### 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.

### showCharacter

    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.

  Overrides:
    `showCharacter` in class `PDFTextStripper`
  Parameters:
    `text` - The character to be displayed.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD