| java.lang.Object org.pdfbox.util.PDFStreamEngine
All known Subclasses: org.pdfbox.util.PDFTextStripper, org.pdfbox.pdfviewer.PageDrawer, org.pdfbox.pdmodel.font.Type3StreamParser, org.pdfbox.examples.util.PrintImageLocations,
PDFStreamEngine | public class PDFStreamEngine (Code) | | 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.
author: Ben Litchfield version: $Revision: 1.35 $ |
PDFStreamEngine | public PDFStreamEngine()(Code) | | Constructor.
|
PDFStreamEngine | public PDFStreamEngine(Properties properties) throws IOException(Code) | | Constructor with engine properties. The property keys are all
PDF operators, the values are class names used to execute those
operators.
Parameters: properties - The engine properties. throws: IOException - If there is an error setting the engine properties. |
getColorSpaces | public Map getColorSpaces()(Code) | | Returns the colorSpaces. |
getCurrentPage | public PDPage getCurrentPage()(Code) | | Get the current page that is being processed.
The page being processed. |
getFonts | public Map getFonts()(Code) | | Returns the fonts. |
getGraphicsStack | public Stack getGraphicsStack()(Code) | | Returns the graphicsStack. |
getGraphicsStates | public Map getGraphicsStates()(Code) | | Returns the graphicsStates. |
getTextLineMatrix | public Matrix getTextLineMatrix()(Code) | | Returns the textLineMatrix. |
getTextMatrix | public Matrix getTextMatrix()(Code) | | Returns the textMatrix. |
getXObjects | public Map getXObjects()(Code) | | Returns the colorSpaces. |
processOperator | public void processOperator(String operation, List arguments) throws IOException(Code) | | This is used to handle an operation.
Parameters: operation - The operation to perform. Parameters: arguments - The list of arguments. throws: IOException - If there is an error processing the operation. |
processOperator | protected void processOperator(PDFOperator operator, List arguments) throws IOException(Code) | | This is used to handle an operation.
Parameters: operator - The operation to perform. Parameters: arguments - The list of arguments. throws: IOException - If there is an error processing the operation. |
processStream | public void processStream(PDPage aPage, PDResources resources, COSStream cosStream) throws IOException(Code) | | This will process the contents of the stream.
Parameters: aPage - The page. Parameters: resources - The location to retrieve resources. Parameters: cosStream - the Stream to execute. throws: IOException - if there is an error accessing the stream. |
processSubStream | public void processSubStream(PDPage aPage, PDResources resources, COSStream cosStream) throws IOException(Code) | | Process a sub stream of the current stream.
Parameters: aPage - The page used for drawing. Parameters: resources - The resources used when processing the stream. Parameters: cosStream - The stream to process. throws: IOException - If there is an exception while processing the stream. |
registerOperatorProcessor | public void registerOperatorProcessor(String operator, OperatorProcessor op)(Code) | | Register a custom operator processor with the engine.
Parameters: operator - The operator as a string. Parameters: op - Processor instance. |
resetEngine | public void resetEngine()(Code) | | 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.
|
setColorSpaces | public void setColorSpaces(Map value)(Code) | | Parameters: value - The colorSpaces to set. |
setFonts | public void setFonts(Map value)(Code) | | Parameters: value - The fonts to set. |
setGraphicsStack | public void setGraphicsStack(Stack value)(Code) | | Parameters: value - The graphicsStack to set. |
setGraphicsState | public void setGraphicsState(PDGraphicsState value)(Code) | | Parameters: value - The graphicsState to set. |
setGraphicsStates | public void setGraphicsStates(Map value)(Code) | | Parameters: value - The graphicsStates to set. |
setTextLineMatrix | public void setTextLineMatrix(Matrix value)(Code) | | Parameters: value - The textLineMatrix to set. |
setTextMatrix | public void setTextMatrix(Matrix value)(Code) | | Parameters: value - The textMatrix to set. |
showCharacter | protected void showCharacter(TextPosition text)(Code) | | A method provided as an event interface to allow a subclass to perform
some specific functionality when a character needs to be displayed.
Parameters: text - The character to be displayed. |
showString | public void showString(byte[] string) throws IOException(Code) | | You should override this method if you want to perform an action when a
string is being shown.
Parameters: string - The string to display. throws: IOException - If there is an error showing the string |
|
|