public class PdfContentStreamHandler extends Object
Modifier and Type | Field and Description |
---|---|
Stack<GraphicsState> |
gsStack
Stack keeping track of the graphics state.
|
Map<String,ContentOperator> |
operators
A map with all supported operators operators (PDF syntax).
|
Matrix |
textLineMatrix
Text line matrix.
|
Matrix |
textMatrix
Text matrix.
|
Constructor and Description |
---|
PdfContentStreamHandler(TextAssembler renderListener) |
Modifier and Type | Method and Description |
---|---|
CMapAwareDocumentFont |
getCurrentFont() |
protected Matrix |
getCurrentTextLineMatrix()
Returns the current line matrix.
|
protected Matrix |
getCurrentTextMatrix()
Returns the current text matrix.
|
String |
getResultantText() |
protected void |
installDefaultOperators()
Loads all the supported graphics and text state operators in a map.
|
void |
invokeOperator(PdfLiteral operator,
ArrayList<PdfObject> operands,
PdfDictionary resources)
Invokes an operator.
|
ContentOperator |
lookupOperator(String operatorName)
Get the operator to process a command with a given name
|
void |
registerContentOperator(ContentOperator operator)
Registers a content operator that will be called when the specified
operator string is encountered during content processing.
|
void |
reset() |
public Map<String,ContentOperator> operators
public Stack<GraphicsState> gsStack
public Matrix textMatrix
public Matrix textLineMatrix
public PdfContentStreamHandler(TextAssembler renderListener)
renderListener
- public void registerContentOperator(ContentOperator operator)
operator
- the operator that will receive notification when the operator
is encounteredprotected void installDefaultOperators()
public ContentOperator lookupOperator(String operatorName)
operatorName
- name of the operator that we might need to callpublic void invokeOperator(PdfLiteral operator, ArrayList<PdfObject> operands, PdfDictionary resources)
operator
- the PDF Syntax of the operatoroperands
- a list with operandsresources
- Pdf Resources found in the file containing the stream.public void reset()
protected Matrix getCurrentTextMatrix()
protected Matrix getCurrentTextLineMatrix()
public CMapAwareDocumentFont getCurrentFont()
public String getResultantText()
Copyright © 2018. All rights reserved.