Table of Contents

Class PdfActionAnnotation

Namespace
Syncfusion.Pdf.Interactive
Assembly
Syncfusion.Pdf.Portable.dll

Represents the annotation with associated action.

public class PdfActionAnnotation : PdfActionLinkAnnotation, INotifyPropertyChanged
Inheritance
PdfActionAnnotation
Implements
Inherited Members

Constructors

PdfActionAnnotation(RectangleF, PdfAction)

Initializes a new instance of the PdfActionAnnotation class with specified bounds and action.

public PdfActionAnnotation(RectangleF rectangle, PdfAction action)

Parameters

rectangle RectangleF

The bounds of the annotation.

action PdfAction

The PDF action that can be triggered with different actions.

Examples

//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a new rectangle.
RectangleF actionAnnotationBounds = new RectangleF(10, 40, 100, 30);
//Set the go to action
PdfGoToAction gotoAction = new PdfGoToAction(page);
//Set destination location.
gotoAction.Destination = new PdfDestination(page, new PointF(0, 100));
//Create Action annotation.
PdfActionAnnotation actionAnnotation = new PdfActionAnnotation(actionAnnotationBounds, gotoAction);
//Set the text and font.
actionAnnotation.Color = new PdfColor(Color.Red);
//Add this annotation to a new page.
page.Annotations.Add(actionAnnotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create a new page .
Dim page As PdfPage = document.Pages.Add()
'Create a new rectangle.
Dim actionAnnotationBounds As New RectangleF(10, 40, 100, 30)
'Set the go to action.
Dim gotoAction As New PdfGoToAction(page)
'Set destination location
gotoAction.Destination = New PdfDestination(page, New PointF(0, 100))
'Create Action annotation.
Dim actionAnnotation As New PdfActionAnnotation(actionAnnotationBounds, gotoAction)
'Set the text and font.
actionAnnotation.Color = New PdfColor(Color.Red)
'Add this annotation to a new page.
page.Annotations.Add(actionAnnotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document.
document.Close(True)
See Also

Methods

Save()

Saves annotation object.

protected override void Save()
See Also

See Also