iText 9.1.0 API
iText.Kernel.Utils.Annotationsflattening.DefaultAnnotationFlattener Class Reference

This class is used to flatten annotations. More...

Inheritance diagram for iText.Kernel.Utils.Annotationsflattening.DefaultAnnotationFlattener:
iText.Kernel.Utils.Annotationsflattening.IAnnotationFlattener iText.Kernel.Utils.Annotationsflattening.AbstractTextMarkupAnnotationFlattener iText.Kernel.Utils.Annotationsflattening.HighLightTextMarkupAnnotationFlattener iText.Kernel.Utils.Annotationsflattening.SquigglyTextMarkupAnnotationFlattener iText.Kernel.Utils.Annotationsflattening.StrikeOutTextMarkupAnnotationFlattener iText.Kernel.Utils.Annotationsflattening.UnderlineTextMarkupAnnotationFlattener

Public Member Functions

  DefaultAnnotationFlattener ()
  Creates a new DefaultAnnotationFlattener instance. More...
 
virtual bool  Flatten (PdfAnnotation annotation, PdfPage page)
  Flatten annotation. More...
 

Package Functions

virtual PdfCanvas  CreateCanvas (PdfPage page)
  Creates a canvas. More...
 
virtual bool  Draw (PdfAnnotation annotation, PdfPage page)
  Draws annotation. More...
 

Detailed Description

This class is used to flatten annotations.

This class is used to flatten annotations. The default implementation first tries to draw the normal appearance stream of the annotation. If the normal appearance stream is not present, then it tries to draw the annotation using the fallback implementation.

Constructor & Destructor Documentation

◆ DefaultAnnotationFlattener()

iText.Kernel.Utils.Annotationsflattening.DefaultAnnotationFlattener.DefaultAnnotationFlattener ( )
inline

Creates a new DefaultAnnotationFlattener instance.

Member Function Documentation

◆ CreateCanvas()

virtual PdfCanvas iText.Kernel.Utils.Annotationsflattening.DefaultAnnotationFlattener.CreateCanvas ( PdfPage  page )
inlinepackagevirtual

Creates a canvas.

Creates a canvas. It will draw above the other items on the canvas.

Parameters
page the page to draw the annotation on
Returns
the iText.Kernel.Pdf.Canvas.PdfCanvas the annotation will be drawn upon.

Reimplemented in iText.Kernel.Utils.Annotationsflattening.HighLightTextMarkupAnnotationFlattener.

◆ Draw()

virtual bool iText.Kernel.Utils.Annotationsflattening.DefaultAnnotationFlattener.Draw ( PdfAnnotation  annotation,
PdfPage  page 
)
inlinepackagevirtual

Draws annotation.

Draws annotation. This method is called if the normal appearance stream of the annotation is not present. The default implementation returns false.

Parameters
annotation annotation to draw
page page to draw annotation on
Returns
true if annotation was drawn, false otherwise

Reimplemented in iText.Kernel.Utils.Annotationsflattening.HighLightTextMarkupAnnotationFlattener, iText.Kernel.Utils.Annotationsflattening.SquigglyTextMarkupAnnotationFlattener, iText.Kernel.Utils.Annotationsflattening.StrikeOutTextMarkupAnnotationFlattener, and iText.Kernel.Utils.Annotationsflattening.UnderlineTextMarkupAnnotationFlattener.

◆ Flatten()

virtual bool iText.Kernel.Utils.Annotationsflattening.DefaultAnnotationFlattener.Flatten ( PdfAnnotation  annotation,
PdfPage  page 
)
inlinevirtual