Class PdfCanvasCsConverter

java.lang.Object
com.itextpdf.kernel.pdf.canvas.parser.PdfCanvasProcessor
com.itextpdf.pdfoptimizer.handlers.converters.PdfCanvasCsConverter

public class PdfCanvasCsConverter extends com.itextpdf.kernel.pdf.canvas.parser.PdfCanvasProcessor
Processor for converting PDF content stream color space.
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.itextpdf.kernel.pdf.canvas.parser.PdfCanvasProcessor

    com.itextpdf.kernel.pdf.canvas.parser.PdfCanvasProcessor.PopGraphicsStateOperator
  • Field Summary

    Fields inherited from class com.itextpdf.kernel.pdf.canvas.parser.PdfCanvasProcessor

    clippingRule, currentPath, DEFAULT_OPERATOR, eventListener, isClip, supportedEvents
  • Constructor Summary

    Constructors
    Constructor
    Description
    PdfCanvasCsConverter(com.itextpdf.kernel.pdf.PdfDocument document, AbstractCsConverter csConverter, OptimizationSession session)
    Instantiates a new PdfCanvasCsConverter instance based on PDF document and color space converter.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.itextpdf.kernel.pdf.canvas.PdfCanvas
    Gets resulting PDF canvas.
    protected void
    invokeOperator(com.itextpdf.kernel.pdf.PdfLiteral operator, List operands)
    Process PDF content stream operators.

    Methods inherited from class com.itextpdf.kernel.pdf.canvas.parser.PdfCanvasProcessor

    beginMarkedContent, endMarkedContent, eventOccurred, getEventListener, getFont, getGraphicsState, getRegisteredOperatorStrings, getResources, getXObjectStream, paintPath, populateOperators, populateXObjectDoHandlers, processContent, processPageContent, registerContentOperator, registerXObjectDoHandler, reset

    Methods inherited from class java.lang.Object

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

    • PdfCanvasCsConverter

      public PdfCanvasCsConverter (com.itextpdf.kernel.pdf.PdfDocument document, AbstractCsConverter csConverter, OptimizationSession session)
      Instantiates a new PdfCanvasCsConverter instance based on PDF document and color space converter.
      Parameters:
      document - the document that the resulting content stream will be written to
      csConverter - the color space converter instance
      session - is an auxiliary object used to support share data between stages of optimization process
  • Method Details

    • getCanvas

      public com.itextpdf.kernel.pdf.canvas.PdfCanvas getCanvas()
      Gets resulting PDF canvas.
      Returns:
      the PDF canvas instance
    • invokeOperator

      protected void invokeOperator (com.itextpdf.kernel.pdf.PdfLiteral operator, List operands)
      Process PDF content stream operators. If it is operator which define or use color space, his operands will be converted by calling the AbstractCsConverter.convertContentStreamOperands(PdfColorSpace, PdfColorSpace, String, List, OptimizationSession) method and then written to the resulting PDF canvas, otherwise operator with operands will be immediately written to th resulting PDF canvas.
      Overrides:
      invokeOperator in class com.itextpdf.kernel.pdf.canvas.parser.PdfCanvasProcessor
      Parameters:
      operator -
      operands -