menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfActionLinkAnnotation - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfActionLinkAnnotation

    Represents base class for link annotations with associated action.

    Inheritance
    System.Object
    PdfAnnotation
    PdfLinkAnnotation
    PdfActionLinkAnnotation
    PdfActionAnnotation
    PdfFileLinkAnnotation
    PdfUriAnnotation
    Implements
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    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.Layer
    PdfAnnotation.Location
    PdfAnnotation.ModifiedDate
    PdfAnnotation.Name
    PdfAnnotation.Opacity
    PdfAnnotation.Page
    PdfAnnotation.PdfTag
    PdfAnnotation.PropertyChanged
    PdfAnnotation.Rotate
    PdfAnnotation.Save()
    PdfAnnotation.SetAppearance(Boolean)
    PdfAnnotation.SetValues(String, String)
    PdfAnnotation.Size
    PdfAnnotation.Subject
    PdfAnnotation.Text
    PdfLinkAnnotation.HighlightMode
    PdfLinkAnnotation.Initialize()
    Namespace: Syncfusion.Pdf.Interactive
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public abstract class PdfActionLinkAnnotation : PdfLinkAnnotation, IPdfWrapper, INotifyPropertyChanged
    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page
    PdfPage page = document.Pages.Add();
    //Create a new rectangle
    RectangleF rectangle = new RectangleF(10, 40, 30, 30);
    //Create a new file link annotation.
    PdfFileLinkAnnotation fileLinkAnnotation = new PdfFileLinkAnnotation(rectangle, @"Input.png");
    //Set a action to file link annotation.
    PdfJavaScriptAction javaAction = new PdfJavaScriptAction("app.alert(\"You are looking at Java script action of PDF \")");
    fileLinkAnnotation.Action = javaAction;
    //Add this annotation to a new page.
    page.Annotations.Add(fileLinkAnnotation);
    //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 rectangle As New RectangleF(10, 40, 30, 30)
    'Create a new file link annotation.
    Dim fileLinkAnnotation As New PdfFileLinkAnnotation(rectangle, "Input.png")
    'Set a action to file link annotation.
    Dim javaAction As New PdfJavaScriptAction("app.alert(""You are looking at Java script action of PDF "")")
    fileLinkAnnotation.Action = javaAction
    'Add this annotation to a new page.
    page.Annotations.Add(fileLinkAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)

    Constructors

    PdfActionLinkAnnotation(RectangleF)

    Initializes a new instance of the PdfActionLinkAnnotation class with specified bounds.

    Declaration
    public PdfActionLinkAnnotation(RectangleF rectangle)
    Parameters
    Type Name Description
    RectangleF rectangle

    The bounds of the annotation.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page
    PdfPage page = document.Pages.Add();
    //Create a new rectangle
    RectangleF rectangle = new RectangleF(10, 40, 30, 30);
    //Create a new file link annotation.
    PdfFileLinkAnnotation fileLinkAnnotation = new PdfFileLinkAnnotation(rectangle,  "input.png");
    //Set a action to file link annotation.
    PdfJavaScriptAction javaAction = new PdfJavaScriptAction("app.alert(\"You are looking at Java script action of PDF \")");
    fileLinkAnnotation.Action = javaAction;
    //Add this annotation to a new page.
    page.Annotations.Add(fileLinkAnnotation);
    //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 rectangle As New RectangleF(10, 40, 30, 30)
    'Create a new file link annotation.
    Dim fileLinkAnnotation As New PdfFileLinkAnnotation(rectangle,  "input.png")
    'Set a action to file link annotation.
    Dim javaAction As New PdfJavaScriptAction("app.alert(""You are looking at Java script action of PDF "")")
    fileLinkAnnotation.Action = javaAction
    'Add this annotation to a new page.
    page.Annotations.Add(fileLinkAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfFileLinkAnnotation
    PdfJavaScriptAction

    PdfActionLinkAnnotation(RectangleF, PdfAction)

    Initializes a new instance of the PdfActionLinkAnnotation class with specified bounds and action to be performed.

    Declaration
    public PdfActionLinkAnnotation(RectangleF rectangle, PdfAction action)
    Parameters
    Type Name Description
    RectangleF rectangle

    The bounds specifies the location of the drawn text.

    PdfAction action

    The PdfAction specifies an action to be executed when the link is activated.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page
    PdfPage page = document.Pages.Add();
    //Create a new rectangle
    RectangleF bounds = new RectangleF(10, 40, 30, 30);
    //Create a new file link annotation.
    PdfFileLinkAnnotation fileLinkAnnotation = new PdfFileLinkAnnotation(bounds, "Input.png");
    //Set a action to file link annotation.
    PdfJavaScriptAction javaAction = new PdfJavaScriptAction("app.alert(\"You are looking at Java script action of PDF \")");
    fileLinkAnnotation.Action = javaAction;
    //Add this annotation to a new page.
    page.Annotations.Add(fileLinkAnnotation);
    //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 rectangle As New RectangleF(10, 40, 30, 30)
    'Create a new file link annotation.
    Dim fileLinkAnnotation As New PdfFileLinkAnnotation(rectangle, "Input.png")
    'Set a action to file link annotation.
    Dim javaAction As New PdfJavaScriptAction("app.alert(""You are looking at Java script action of PDF "")")
    fileLinkAnnotation.Action = javaAction
    'Add this annotation to a new page.
    page.Annotations.Add(fileLinkAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfFileLinkAnnotation
    PdfJavaScriptAction

    Properties

    Action

    Gets or sets the action for the link annotation.

    Declaration
    public virtual PdfAction Action { get; set; }
    Property Value
    Type Description
    PdfAction

    The action to be executed when the link is activated.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page
    PdfPage page = document.Pages.Add();
    //Create a new rectangle
    RectangleF rectangle = new RectangleF(10, 40, 30, 30);
    //Create a new file link annotation.
    PdfFileLinkAnnotation fileLinkAnnotation = new PdfFileLinkAnnotation(rectangle, @"Input.png");
    //Set a action to file link annotation.
    PdfJavaScriptAction javaAction = new PdfJavaScriptAction("app.alert(\"You are looking at Java script action of PDF \")");
    fileLinkAnnotation.Action = javaAction;
    //Add this annotation to a new page.
    page.Annotations.Add(fileLinkAnnotation);
    //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 rectangle As New RectangleF(10, 40, 30, 30)
    'Create a new file link annotation.
    Dim fileLinkAnnotation As New PdfFileLinkAnnotation(rectangle, "Input.png")
    'Set a action to file link annotation.
    Dim javaAction As New PdfJavaScriptAction("app.alert(""You are looking at Java script action of PDF "")")
    fileLinkAnnotation.Action = javaAction
    'Add this annotation to a new page.
    page.Annotations.Add(fileLinkAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfFileLinkAnnotation
    PdfJavaScriptAction

    Implements

    System.ComponentModel.INotifyPropertyChanged

    See Also

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