com.lowagie.text.pdf.parser
Class PdfContentStreamProcessor

java.lang.Object
  extended bycom.lowagie.text.pdf.parser.PdfContentStreamProcessor
Direct Known Subclasses:
SimpleTextExtractingPdfContentStreamProcessor

public abstract class PdfContentStreamProcessor
extends Object

Processor for a PDF content Stream.

Since:
2.1.4

Constructor Summary
PdfContentStreamProcessor()
          Creates a new PDF Content Stream Processor.
 
Method Summary
 void displayPdfString(PdfString string, float tj)
          Displays text.
abstract  void displayText(String text, Matrix nextTextMatrix)
          Displays text.
 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 reset()
          Resets the graphics state stack, matrices and resources.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfContentStreamProcessor

public PdfContentStreamProcessor()
Creates a new PDF Content Stream Processor.

Method Detail

reset

public void reset()
Resets the graphics state stack, matrices and resources.


gs

public GraphicsState gs()
Returns the current graphics state.

Returns:
the graphics state

invokeOperator

public void invokeOperator(PdfLiteral operator,
                           ArrayList operands)
Invokes an operator.

Parameters:
operator - the PDF Syntax of the operator
operands - a list with operands

displayText

public abstract void displayText(String text,
                                 Matrix nextTextMatrix)
Displays text.

Parameters:
text - the text that needs to be displayed
nextTextMatrix - a text matrix

getStringWidth

public float getStringWidth(String string,
                            float tj)
Gets the width of a String.

Parameters:
string - the string that needs measuring
tj - text adjustment
Returns:
the width of a String

displayPdfString

public void displayPdfString(PdfString string,
                             float tj)
Displays text.

Parameters:
string - the text to display
tj - the text adjustment

processContent

public void processContent(byte[] contentBytes,
                           PdfDictionary resources)
Processes PDF syntax

Parameters:
contentBytes - the bytes of a content stream
resources - the resources that come with the content stream


Copyright © 2011 EGIZ - E-Government Innovation Center. All Rights Reserved.