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
PdfPagethe page to draw the annotation on
Returns
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
PdfAnnotationannotation to draw
page
PdfPagepage 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
PdfAnnotationpage
PdfPage