| Modifier and Type | Field and Description |
|---|---|
| private PDPage | |
| private PDFont | |
| private Deque | |
| private Matrix | |
| private boolean | |
| private int | |
| private static final Log | |
| private final Map | |
| private PDResources | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public final void | |
| protected void | applyTextAdjustment(float
x-translation tx, float y-translation ty)Applies a text position adjustment from the TJ operator. |
| public void | beginMarkedContentSequence(COSName
indicates the role or significance of the sequence tag, COSDictionary optional properties properties)Called when a marked content group begins |
| public void | |
| private void | clipToRect(PDRectangle rectangle)
Transforms the given rectangle using the CTM and then intersects it with the current clipping area. |
| public void | |
| public void | |
| public void | |
| public PDAppearanceStream | Returns: The stream to process.The current annotation. annotation)Returns the appearance stream to process for the given annotation. |
| public PDPage | |
| private PDFont | Returns: the default fontProvide standard 14 Helvetica font as default if there isn't any font available. |
| public int | |
| public PDGraphicsState | |
| public Matrix | |
| public int | |
| public PDResources | Returns: the stream' resources. This is mainly to be used by theOperatorProcessor
classes.
|
| public Matrix | |
| public Matrix | |
| public void | |
| private void | |
| public boolean | Returns: true if color operators should be processed, false if not, e.g. in type3 charprocs with d1 or in uncolored tiling patterns.Tells whether color operators should be processed. |
| protected void | operatorException(Operator
The unknown operator. operator, List<COSBase> The list of operands. operands, IOException the excpetion which occured when processing the operator exception)Called when an exception is thrown by an operator. |
| private void | popResources(PDResources parentResources)
Pops the current resources, replacing them with the given resources. |
| protected void | processAnnotation(PDAnnotation
The annotation containing the appearance stream to process. annotation, PDAppearanceStream The appearance stream to process. appearance)Process the given annotation with the specified appearance stream. |
| protected void | processChildStream(PDContentStream
the child content stream contentStream, PDPage the page to be used for processing page)Process a child stream of the given page. |
| public void | processOperator(String
The operation to perform. operation, List<COSBase> The list of arguments. arguments)This is used to handle an operation. |
| protected void | processOperator(Operator
The operation to perform. operator, List<COSBase> The list of arguments. operands)This is used to handle an operation. |
| public void | processPage(PDPage
the page to process page)This will initialize and process the contents of the stream. |
| protected void | processSoftMask(PDTransparencyGroup
transparency group used for the soft mask group)Processes a soft mask transparency group stream. |
| private void | |
| private void | processStreamOperators(PDContentStream
to content stream to parse. contentStream)Processes the operators of the given content stream. |
| protected final void | processTilingPattern(PDTilingPattern
the tiling pattern tilingPattern, PDColor color to use, if this is an uncoloured pattern, otherwise null. color, PDColorSpace color space to use, if this is an uncoloured pattern, otherwise null. colorSpace)Process the given tiling pattern. |
| protected final void | processTilingPattern(PDTilingPattern
the tiling pattern tilingPattern, PDColor color to use, if this is an uncoloured pattern, otherwise null. color, PDColorSpace color space to use, if this is an uncoloured pattern, otherwise null. colorSpace, Matrix the pattern matrix, may be overridden for custom rendering. patternMatrix)Process the given tiling pattern. |
| protected void | processTransparencyGroup(PDTransparencyGroup
transparency group to be processed group)Processes a transparency group stream. |
| protected void | processType3Stream(PDType3CharProc
Type 3 character procedure charProc, Matrix the Text Rendering Matrix textRenderingMatrix)Processes a Type 3 character stream. |
| private PDResources | pushResources(PDContentStream contentStream)
Pushes the given stream's resources, returning the previous resources. |
| protected final void | restoreGraphicsStack(Deque<PDGraphicsState>
the graphics state to be restored snapshot)Restores the entire graphics stack. |
| public void | |
| protected final Deque | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | showAnnotation(PDAnnotation
An annotation on the current page. annotation)Shows the given annotation. |
| protected void | showFontGlyph(Matrix
the current text rendering matrix, Trm textRenderingMatrix, PDFont the current font font, int internal PDF character code for the glyph code, Vector the displacement (i.e. advance) of the glyph in text space displacement)Called when a glyph is to be processed. |
| public void | |
| protected void | |
| protected void | |
| public void | |
| public void | showTextStrings(COSArray
array of encoded text strings and adjustments array)Called when a string of text with spacing adjustments is to be shown. |
| public void | showTransparencyGroup(PDTransparencyGroup
transparency group (form) XObject form)Shows a transparency group from the content stream. |
| protected void | showType3Glyph(Matrix
the current text rendering matrix, Trm textRenderingMatrix, PDType3Font the current font font, int internal PDF character code for the glyph code, Vector the displacement (i.e. advance) of the glyph in text space displacement)Called when a glyph is to be processed. |
| public Point2D. | Returns: the transformed pointthe x-coordinate of the point to be transformed x, float the y-coordinate of the point to be transformed y)Transforms a point using the CTM. |
| protected float | Returns: the transformed widththe width to be transformed width)Transforms a width using the CTM. |
| protected void | unsupportedOperator(Operator
The unknown operator. operator, List<COSBase> The list of operands. operands)Called when an unsupported operator is encountered. |
| currentPage | back to summary |
|---|---|
| private PDPage currentPage | |
| defaultFont | back to summary |
|---|---|
| private PDFont defaultFont | |
| graphicsStack | back to summary |
|---|---|
| private Deque<PDGraphicsState> graphicsStack | |
| initialMatrix | back to summary |
|---|---|
| private Matrix initialMatrix | |
| isProcessingPage | back to summary |
|---|---|
| private boolean isProcessingPage | |
| level | back to summary |
|---|---|
| private int level | |
| LOG | back to summary |
|---|---|
| private static final Log LOG | |
| operators | back to summary |
|---|---|
| private final Map<String, OperatorProcessor> operators | |
| resources | back to summary |
|---|---|
| private PDResources resources | |
| shouldProcessColorOperators | back to summary |
|---|---|
| private boolean shouldProcessColorOperators | |
| PDFStreamEngine | back to summary |
|---|---|
| protected PDFStreamEngine() Creates a new PDFStreamEngine. | |
| addOperator | back to summary |
|---|---|
| public final void addOperator(OperatorProcessor op) Adds an operator processor to the engine.
| |
| applyTextAdjustment | back to summary |
|---|---|
| protected void applyTextAdjustment(float tx, float ty) Applies a text position adjustment from the TJ operator. May be overridden in subclasses.
| |
| beginMarkedContentSequence | back to summary |
|---|---|
| public void beginMarkedContentSequence(COSName tag, COSDictionary properties) Called when a marked content group begins
| |
| beginText | back to summary |
|---|---|
| public void beginText() throws IOException Called when the BT operator is encountered. This method is for overriding in subclasses, the default implementation does nothing.
| |
| clipToRect | back to summary |
|---|---|
| private void clipToRect(PDRectangle rectangle) Transforms the given rectangle using the CTM and then intersects it with the current clipping area. | |
| decreaseLevel | back to summary |
|---|---|
| public void decreaseLevel() Decrease the level. Call this after running a potentially recursive operation. A log message is shown if the level is below 0. This can happen if the level is not decreased after an operation is done, e.g. by using a "finally" block. | |
| endMarkedContentSequence | back to summary |
|---|---|
| public void endMarkedContentSequence() Called when a marked content group ends | |
| endText | back to summary |
|---|---|
| public void endText() throws IOException Called when the ET operator is encountered. This method is for overriding in subclasses, the default implementation does nothing.
| |
| getAppearance | back to summary |
|---|---|
| public PDAppearanceStream getAppearance(PDAnnotation annotation) Returns the appearance stream to process for the given annotation. May be used to render a specific appearance such as "hover".
| |
| getCurrentPage | back to summary |
|---|---|
| public PDPage getCurrentPage() Returns the current page.
| |
| getDefaultFont | back to summary |
|---|---|
| private PDFont getDefaultFont() Provide standard 14 Helvetica font as default if there isn't any font available.
| |
| getGraphicsStackSize | back to summary |
|---|---|
public int getGraphicsStackSize()
| |
| getGraphicsState | back to summary |
|---|---|
public PDGraphicsState getGraphicsState()
| |
| getInitialMatrix | back to summary |
|---|---|
| public Matrix getInitialMatrix() Gets the stream's initial matrix.
| |
| getLevel | back to summary |
|---|---|
| public int getLevel() Get the current level. This can be used to decide whether a recursion has done too deep and an operation should be skipped to avoid a stack overflow.
| |
| getResources | back to summary |
|---|---|
public PDResources getResources()
| |
| getTextLineMatrix | back to summary |
|---|---|
public Matrix getTextLineMatrix()
| |
| getTextMatrix | back to summary |
|---|---|
public Matrix getTextMatrix()
| |
| increaseLevel | back to summary |
|---|---|
| public void increaseLevel() Increase the level. Call this before running a potentially recursive operation. | |
| initPage | back to summary |
|---|---|
| private void initPage(PDPage page) Initializes the stream engine for the given page. | |
| isShouldProcessColorOperators | back to summary |
|---|---|
| public boolean isShouldProcessColorOperators() Tells whether color operators should be processed. To be used in some OperatorProcessor classes.
| |
| operatorException | back to summary |
|---|---|
| protected void operatorException(Operator operator, List<COSBase> operands, IOException exception) throws IOException Called when an exception is thrown by an operator.
| |
| popResources | back to summary |
|---|---|
| private void popResources(PDResources parentResources) Pops the current resources, replacing them with the given resources. | |
| processAnnotation | back to summary |
|---|---|
| protected void processAnnotation(PDAnnotation annotation, PDAppearanceStream appearance) throws IOException Process the given annotation with the specified appearance stream.
| |
| processChildStream | back to summary |
|---|---|
| protected void processChildStream(PDContentStream contentStream, PDPage page) throws IOException Process a child stream of the given page. Cannot be used with
| |
| processOperator | back to summary |
|---|---|
| public void processOperator(String operation, List<COSBase> arguments) throws IOException This is used to handle an operation.
| |
| processOperator | back to summary |
|---|---|
| protected void processOperator(Operator operator, List<COSBase> operands) throws IOException This is used to handle an operation.
| |
| processPage | back to summary |
|---|---|
| public void processPage(PDPage page) throws IOException This will initialize and process the contents of the stream.
| |
| processSoftMask | back to summary |
|---|---|
| protected void processSoftMask(PDTransparencyGroup group) throws IOException Processes a soft mask transparency group stream.
| |
| processStream | back to summary |
|---|---|
| private void processStream(PDContentStream contentStream) throws IOException Process a content stream.
| |
| processStreamOperators | back to summary |
|---|---|
| private void processStreamOperators(PDContentStream contentStream) throws IOException Processes the operators of the given content stream.
| |
| processTilingPattern | back to summary |
|---|---|
| protected final void processTilingPattern(PDTilingPattern tilingPattern, PDColor color, PDColorSpace colorSpace) throws IOException Process the given tiling pattern.
| |
| processTilingPattern | back to summary |
|---|---|
| protected final void processTilingPattern(PDTilingPattern tilingPattern, PDColor color, PDColorSpace colorSpace, Matrix patternMatrix) throws IOException Process the given tiling pattern. Allows the pattern matrix to be overridden for custom rendering.
| |
| processTransparencyGroup | back to summary |
|---|---|
| protected void processTransparencyGroup(PDTransparencyGroup group) throws IOException Processes a transparency group stream.
| |
| processType3Stream | back to summary |
|---|---|
| protected void processType3Stream(PDType3CharProc charProc, Matrix textRenderingMatrix) throws IOException Processes a Type 3 character stream.
| |
| pushResources | back to summary |
|---|---|
| private PDResources pushResources(PDContentStream contentStream) Pushes the given stream's resources, returning the previous resources. | |
| restoreGraphicsStack | back to summary |
|---|---|
| protected final void restoreGraphicsStack(Deque<PDGraphicsState> snapshot) Restores the entire graphics stack.
| |
| restoreGraphicsState | back to summary |
|---|---|
| public void restoreGraphicsState() Pops the current graphics state from the stack. | |
| saveGraphicsStack | back to summary |
|---|---|
| protected final Deque Saves the entire graphics stack.
| |
| saveGraphicsState | back to summary |
|---|---|
| public void saveGraphicsState() Pushes the current graphics state to the stack. | |
| setLineDashPattern | back to summary |
|---|---|
public void setLineDashPattern(COSArray array, int phase)
| |
| setTextLineMatrix | back to summary |
|---|---|
public void setTextLineMatrix(Matrix value)
| |
| setTextMatrix | back to summary |
|---|---|
public void setTextMatrix(Matrix value)
| |
| showAnnotation | back to summary |
|---|---|
| public void showAnnotation(PDAnnotation annotation) throws IOException Shows the given annotation.
| |
| showFontGlyph | back to summary |
|---|---|
| protected void showFontGlyph(Matrix textRenderingMatrix, PDFont font, int code, Vector displacement) throws IOException Called when a glyph is to be processed. This method is intended for overriding in subclasses, the default implementation does nothing.
| |
| showForm | back to summary |
|---|---|
| public void showForm(PDFormXObject form) throws IOException Shows a form from the content stream.
| |
| showGlyph | back to summary |
|---|---|
| protected void showGlyph(Matrix textRenderingMatrix, PDFont font, int code, Vector displacement) throws IOException Called when a glyph is to be processed. This method is intended for overriding in subclasses, the default implementation does nothing.
| |
| showText | back to summary |
|---|---|
| protected void showText(byte[] string) throws IOException Process text from the PDF Stream. You should override this method if you want to perform an action when encoded text is being processed.
| |
| showTextString | back to summary |
|---|---|
| public void showTextString(byte[] string) throws IOException Called when a string of text is to be shown.
| |
| showTextStrings | back to summary |
|---|---|
| public void showTextStrings(COSArray array) throws IOException Called when a string of text with spacing adjustments is to be shown.
| |
| showTransparencyGroup | back to summary |
|---|---|
| public void showTransparencyGroup(PDTransparencyGroup form) throws IOException Shows a transparency group from the content stream.
| |
| showType3Glyph | back to summary |
|---|---|
| protected void showType3Glyph(Matrix textRenderingMatrix, PDType3Font font, int code, Vector displacement) throws IOException Called when a glyph is to be processed. This method is intended for overriding in subclasses, the default implementation does nothing.
| |
| transformedPoint | back to summary |
|---|---|
| public Point2D. Transforms a point using the CTM. | |
| transformWidth | back to summary |
|---|---|
| protected float transformWidth(float width) Transforms a width using the CTM.
| |
| unsupportedOperator | back to summary |
|---|---|
| protected void unsupportedOperator(Operator operator, List<COSBase> operands) throws IOException Called when an unsupported operator is encountered.
| |