Table of Contents

Class DefaultAnnotationFlattener

Namespace
iText.Kernel.Utils.Annotationsflattening
Assembly
itext.kernel.dll

This class is used to flatten annotations.

public class DefaultAnnotationFlattener : IAnnotationFlattener
Inheritance
DefaultAnnotationFlattener
Implements
Derived
Inherited Members

Remarks

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.

Constructors

DefaultAnnotationFlattener()

Creates a new DefaultAnnotationFlattener instance.

public DefaultAnnotationFlattener()

Methods

CreateCanvas(PdfPage)

Creates a canvas.

protected virtual PdfCanvas CreateCanvas(PdfPage page)

Parameters

page PdfPage

the page to draw the annotation on

Returns

PdfCanvas

the PdfCanvas the annotation will be drawn upon.

Remarks

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

Draw(PdfAnnotation, PdfPage)

Draws annotation.

protected virtual bool Draw(PdfAnnotation annotation, PdfPage page)

Parameters

annotation PdfAnnotation

annotation to draw

page PdfPage

page to draw annotation on

Returns

bool

true if annotation was drawn, false otherwise

Remarks

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

Flatten(PdfAnnotation, PdfPage)

public virtual bool Flatten(PdfAnnotation annotation, PdfPage page)

Parameters

annotation PdfAnnotation
page PdfPage

Returns

bool