menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfActionAnnotation - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfActionAnnotation

    Represents the annotation with associated action.

    Inheritance
    System.Object
    PdfAnnotation
    PdfLinkAnnotation
    PdfActionLinkAnnotation
    PdfActionAnnotation
    Implements
    IPdfWrapper
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    PdfActionLinkAnnotation.Action
    PdfAnnotation.AnnotationFlags
    PdfAnnotation.Author
    PdfAnnotation.Border
    PdfAnnotation.Bounds
    PdfAnnotation.CalculateBounds(RectangleF, PdfPage, PdfLoadedPage)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate, Boolean)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate, Boolean, PdfGraphics)
    PdfAnnotation.CheckFlatten()
    PdfAnnotation.Color
    PdfAnnotation.Flatten
    PdfAnnotation.FlattenPopUps
    PdfAnnotation.InnerColor
    PdfAnnotation.IPdfWrapper.Element
    PdfAnnotation.Layer
    PdfAnnotation.Location
    PdfAnnotation.ModifiedDate
    PdfAnnotation.Name
    PdfAnnotation.Opacity
    PdfAnnotation.Page
    PdfAnnotation.PdfTag
    PdfAnnotation.PropertyChanged
    PdfAnnotation.Rotate
    PdfAnnotation.SetAppearance(Boolean)
    PdfAnnotation.SetValues(String, String)
    PdfAnnotation.Size
    PdfAnnotation.Subject
    PdfAnnotation.Text
    PdfLinkAnnotation.HighlightMode
    PdfLinkAnnotation.Initialize()
    Namespace: Syncfusion.Pdf.Interactive
    Assembly: Syncfusion.Pdf.UWP.dll
    Syntax
    public class PdfActionAnnotation : PdfActionLinkAnnotation, IPdfWrapper, INotifyPropertyChanged

    Constructors

    PdfActionAnnotation(RectangleF, PdfAction)

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

    Declaration
    public PdfActionAnnotation(RectangleF rectangle, PdfAction action)
    Parameters
    Type Name Description
    System.Drawing.RectangleF rectangle

    The bounds of the annotation.

    PdfAction action

    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
    PdfPage
    PdfGoToAction

    Methods

    Save()

    Saves annotation object.

    Declaration
    protected override void Save()
    Overrides
    PdfAnnotation.Save()

    Implements

    IPdfWrapper
    System.ComponentModel.INotifyPropertyChanged

    Extension Methods

    DateTimeExtension.ToDateTime(Object)

    See Also

    PdfActionLinkAnnotation
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved