Home » pdfbox-1.1.0-src » org.apache.pdfbox.util » [javadoc | source]
org.apache.pdfbox.util
public class: PDFStreamEngine [javadoc | source]
java.lang.Object
   org.apache.pdfbox.util.PDFStreamEngine

Direct Known Subclasses:
    PrintImageLocations, Type3StreamParser, PDFText2HTML, PDFHighlighter, PDFTextStripperByArea, PageDrawer, PDFMarkedContentExtractor, PDFTextStripper, PDFImageWriter, PrintTextLocations

This class will run through a PDF content stream and execute certain operations and provide a callback interface for clients that want to do things with the stream. See the PDFTextStripper class for an example of how to use this class.
Constructor:
 public PDFStreamEngine() 
 public PDFStreamEngine(Properties properties) throws IOException 
    Constructor with engine properties. The property keys are all PDF operators, the values are class names used to execute those operators. An empty value means that the operator will be silently ignored.
    Parameters:
    properties - The engine properties.
    Throws:
    IOException - If there is an error setting the engine properties.
Method from org.apache.pdfbox.util.PDFStreamEngine Summary:
getColorSpaces,   getCurrentPage,   getFonts,   getGraphicsStack,   getGraphicsState,   getGraphicsStates,   getResources,   getTextLineMatrix,   getTextMatrix,   getTotalCharCnt,   getValidCharCnt,   getXObjects,   processEncodedText,   processOperator,   processOperator,   processStream,   processSubStream,   processTextPosition,   registerOperatorProcessor,   resetEngine,   setColorSpaces,   setFonts,   setGraphicsStack,   setGraphicsState,   setGraphicsStates,   setTextLineMatrix,   setTextMatrix
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.pdfbox.util.PDFStreamEngine Detail:
 public Map getColorSpaces() 
 public PDPage getCurrentPage() 
    Get the current page that is being processed.
 public Map getFonts() 
 public Stack getGraphicsStack() 
 public PDGraphicsState getGraphicsState() 
 public Map getGraphicsStates() 
 public PDResources getResources() 
 public Matrix getTextLineMatrix() 
 public Matrix getTextMatrix() 
 public int getTotalCharCnt() 
    Get the total number of characters in the doc (including ones that could not be mapped).
 public int getValidCharCnt() 
    Get the total number of valid characters in the doc that could be decoded in processEncodedText().
 public Map getXObjects() 
 public  void processEncodedText(byte[] string) throws IOException 
    Process encoded text from the PDF Stream. You should override this method if you want to perform an action when encoded text is being processed.
 public  void processOperator(String operation,
    List arguments) throws IOException 
    This is used to handle an operation.
 protected  void processOperator(PDFOperator operator,
    List arguments) throws IOException 
    This is used to handle an operation.
 public  void processStream(PDPage aPage,
    PDResources resources,
    COSStream cosStream) throws IOException 
    This will process the contents of the stream.
 public  void processSubStream(PDPage aPage,
    PDResources resources,
    COSStream cosStream) throws IOException 
    Process a sub stream of the current stream.
 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.
 public  void registerOperatorProcessor(String operator,
    OperatorProcessor op) 
    Register a custom operator processor with the engine.
 public  void resetEngine() 
    This method must be called between processing documents. The PDFStreamEngine caches information for the document between pages and this will release the cached information. This only needs to be called if processing a new document.
 public  void setColorSpaces(Map value) 
 public  void setFonts(Map value) 
 public  void setGraphicsStack(Stack value) 
 public  void setGraphicsState(PDGraphicsState value) 
 public  void setGraphicsStates(Map value) 
 public  void setTextLineMatrix(Matrix value) 
 public  void setTextMatrix(Matrix value)