Class PrintImageLocations

java.lang.Object
org.apache.pdfbox.contentstream.PDFStreamEngine
org.apache.pdfbox.examples.util.PrintImageLocations

public class PrintImageLocations extends org.apache.pdfbox.contentstream.PDFStreamEngine
This is an example on how to get the x/y coordinates of image locations.
Author:
Ben Litchfield
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
    This will print the documents data.
    protected void
    processOperator(org.apache.pdfbox.contentstream.operator.Operator operator, List<org.apache.pdfbox.cos.COSBase> operands)
    This is used to handle an operation.

    Methods inherited from class org.apache.pdfbox.contentstream.PDFStreamEngine

    addOperator, applyTextAdjustment, beginMarkedContentSequence, beginText, decreaseLevel, endMarkedContentSequence, endText, getAppearance, getCurrentPage, getGraphicsStackSize, getGraphicsState, getInitialMatrix, getLevel, getResources, getTextLineMatrix, getTextMatrix, increaseLevel, isShouldProcessColorOperators, markedContentPoint, operatorException, processAnnotation, processChildStream, processOperator, processPage, processSoftMask, processTilingPattern, processTilingPattern, processTransparencyGroup, processType3Stream, restoreGraphicsStack, restoreGraphicsState, saveGraphicsStack, saveGraphicsState, setLineDashPattern, setTextLineMatrix, setTextMatrix, showAnnotation, showFontGlyph, showForm, showGlyph, showText, showTextString, showTextStrings, showTransparencyGroup, showType3Glyph, transformedPoint, transformWidth, unsupportedOperator

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PrintImageLocations

      public PrintImageLocations() throws IOException
      Default constructor.
      Throws:
      IOException - If there is an error loading text stripper properties.
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      This will print the documents data.
      Parameters:
      args - The command line arguments.
      Throws:
      IOException - If there is an error parsing the document.
    • processOperator

      protected void processOperator(org.apache.pdfbox.contentstream.operator.Operator operator, List<org.apache.pdfbox.cos.COSBase> operands) throws IOException
      This is used to handle an operation.
      Overrides:
      processOperator in class org.apache.pdfbox.contentstream.PDFStreamEngine
      Parameters:
      operator - The operation to perform.
      operands - The list of arguments.
      Throws:
      IOException - If there is an error processing the operation.