Class PdfCleanUpProcessor

java.lang.Object
com.itextpdf.kernel.pdf.canvas.parser.PdfCanvasProcessor
com.itextpdf.pdfcleanup.PdfCleanUpProcessor

public class PdfCleanUpProcessor extends com.itextpdf.kernel.pdf.canvas.parser.PdfCanvasProcessor
PDF content stream processor, which filters content to be cleaned up.
  • 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
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    beginMarkedContent(com.itextpdf.kernel.pdf.PdfName tag, com.itextpdf.kernel.pdf.PdfDictionary dict)
     
    protected void
    eventOccurred(com.itextpdf.kernel.pdf.canvas.parser.data.IEventData data, com.itextpdf.kernel.pdf.canvas.parser.EventType type)
     
    com.itextpdf.kernel.pdf.canvas.parser.listener.IEventListener
     
    protected void
    invokeOperator(com.itextpdf.kernel.pdf.PdfLiteral operator, List operands)
     
    void
    processContent(byte[] contentBytes, com.itextpdf.kernel.pdf.PdfResources resources)
     
    void
    processPageAnnotations(com.itextpdf.kernel.pdf.PdfPage page, List regions, boolean redactRedactAnnotations)
    Process the annotations of a page.
    void
    processPageContent(com.itextpdf.kernel.pdf.PdfPage page)
     

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

    endMarkedContent, getFont, getGraphicsState, getRegisteredOperatorStrings, getResources, getXObjectStream, paintPath, populateOperators, populateXObjectDoHandlers, registerContentOperator, registerXObjectDoHandler, reset

    Methods inherited from class java.lang.Object

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

    • processPageContent

      public void processPageContent (com.itextpdf.kernel.pdf.PdfPage page)
      Overrides:
      processPageContent in class com.itextpdf.kernel.pdf.canvas.parser.PdfCanvasProcessor
    • processPageAnnotations

      public void processPageAnnotations (com.itextpdf.kernel.pdf.PdfPage page, List regions, boolean redactRedactAnnotations)
      Process the annotations of a page. Default process behaviour is to remove the annotation if there is (partial) overlap with a redaction region
      Parameters:
      page - the page to process
      regions - a list of redaction regions
      redactRedactAnnotations - true if annotation with subtype /Redact should also be removed
    • processContent

      public void processContent (byte[] contentBytes, com.itextpdf.kernel.pdf.PdfResources resources)
      Overrides:
      processContent in class com.itextpdf.kernel.pdf.canvas.parser.PdfCanvasProcessor
      Parameters:
      contentBytes - the bytes of a content stream
      resources - the resources of the content stream. Must not be null.
    • getEventListener

      public com.itextpdf.kernel.pdf.canvas.parser.listener.IEventListener getEventListener()
      Overrides:
      getEventListener in class com.itextpdf.kernel.pdf.canvas.parser.PdfCanvasProcessor
    • invokeOperator

      protected void invokeOperator (com.itextpdf.kernel.pdf.PdfLiteral operator, List operands)
      Overrides:
      invokeOperator in class com.itextpdf.kernel.pdf.canvas.parser.PdfCanvasProcessor
    • beginMarkedContent

      protected void beginMarkedContent (com.itextpdf.kernel.pdf.PdfName tag, com.itextpdf.kernel.pdf.PdfDictionary dict)
      Overrides:
      beginMarkedContent in class com.itextpdf.kernel.pdf.canvas.parser.PdfCanvasProcessor
    • eventOccurred

      protected void eventOccurred (com.itextpdf.kernel.pdf.canvas.parser.data.IEventData data, com.itextpdf.kernel.pdf.canvas.parser.EventType type)
      Overrides:
      eventOccurred in class com.itextpdf.kernel.pdf.canvas.parser.PdfCanvasProcessor