Module itextpdf

Class PdfContentStreamProcessor


  • public class PdfContentStreamProcessor
    extends java.lang.Object
    Processor for a PDF content Stream.
    Since:
    2.1.4
    • Constructor Summary

      Constructors 
      Constructor Description
      PdfContentStreamProcessor​(RenderListener renderListener)
      Creates a new PDF Content Stream Processor that will send it's output to the designated render listener.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void processContent​(byte[] contentBytes, PdfDictionary resources)
      Processes PDF syntax
      void registerContentOperator​(java.lang.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PdfContentStreamProcessor

        public PdfContentStreamProcessor​(RenderListener renderListener)
        Creates a new PDF Content Stream Processor that will send it's output to the designated render listener.
        Parameters:
        renderListener - the AbstractRenderListener that will receive rendering notifications
    • Method Detail

      • registerContentOperator

        public void registerContentOperator​(java.lang.String operatorString,
                                            ContentOperator operator)
        Registers a content operator that will be called when the specified operator string is encountered during content processing. Each operator may be registered only once (it is not legal to have multiple operators with the same operatorString)
        Parameters:
        operatorString - the operator id
        operator - the operator that will receive notification when the operator is encountered
        Since:
        2.1.7
      • reset

        public void reset()
        Resets the graphics state stack, matrices and resources.
      • 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