public abstract class PdfContentStreamProcessor extends Object
| Constructor and Description |
|---|
PdfContentStreamProcessor()
Creates a new PDF Content Stream Processor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
displayPdfString(PdfString string,
float tj)
Displays text.
|
abstract void |
displayText(String text,
Matrix nextTextMatrix)
Displays text.
|
Matrix |
getCurrentTextLineMatrix()
Returns the current line matrix.
|
Matrix |
getCurrentTextMatrix()
Returns the current text matrix.
|
float |
getStringWidth(String string,
float tj)
Gets the width of a String.
|
GraphicsState |
gs()
Returns the current graphics state.
|
void |
invokeOperator(PdfLiteral operator,
ArrayList operands)
Invokes an operator.
|
void |
processContent(byte[] contentBytes,
PdfDictionary resources)
Processes PDF syntax
|
void |
registerContentOperator(String operatorString,
ContentOperator operator)
Registers a content operator that will be called when the specified operator string is encountered during content processing.
|
void |
reset()
Resets the graphics state stack, matrices and resources.
|
public PdfContentStreamProcessor()
public void registerContentOperator(String operatorString, ContentOperator operator)
operatorString - the operator idoperator - the operator that will receive notification when the operator is encounteredpublic void reset()
public GraphicsState gs()
public Matrix getCurrentTextMatrix()
public Matrix getCurrentTextLineMatrix()
public void invokeOperator(PdfLiteral operator, ArrayList operands)
operator - the PDF Syntax of the operatoroperands - a list with operandspublic abstract void displayText(String text, Matrix nextTextMatrix)
text - the text that needs to be displayednextTextMatrix - a text matrixpublic float getStringWidth(String string, float tj)
string - the string that needs measuringtj - text adjustmentpublic void displayPdfString(PdfString string, float tj)
string - the text to displaytj - the text adjustmentpublic void processContent(byte[] contentBytes,
PdfDictionary resources)
contentBytes - the bytes of a content streamresources - the resources that come with the content streamCopyright © 2024. All rights reserved.