menu

Xamarin.Forms

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

    Show / Hide Table of Contents

    Class PdfNamedDestination

    Represents an named destination which goes to a destination in the current document.

    Inheritance
    System.Object
    PdfNamedDestination
    PdfLoadedNamedDestination
    Namespace: Syncfusion.Pdf.Interactive
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public class PdfNamedDestination : Object, IPdfWrapper

    Constructors

    PdfNamedDestination(String)

    Initializes a new instance of the PdfNamedDestination class.

    Declaration
    public PdfNamedDestination(string title)
    Parameters
    Type Name Description
    System.String title

    The title to be displayed.

    Properties

    Destination

    Gets or sets the named destination's destination.

    Declaration
    public virtual PdfDestination Destination { get; set; }
    Property Value
    Type Description
    PdfDestination

    The PdfDestination object is to be navigated.

    Remarks

    The destination property has to be mentioned as multiples of 100. If we mention as 2, the zoom value will be 200.

    Examples
    //Create a new document.
    PdfDocument document = new PdfDocument();
    //Add a page.
    PdfPage page = document.Pages.Add();
    //Create document named destinations.
    PdfNamedDestination namedDestination = new PdfNamedDestination("Page 1");
    //Set the destination page.
    namedDestination.Destination = new PdfDestination(page);
    //Set the destination location.
    namedDestination.Destination.Location = new PointF(20, 20);
     //Add the named destination.
     document.NamedDestinationCollection.Add(namedDestination);
    //Save and close the PDF document.
    document.Save("NamedDestinations.pdf");
    document.Close(true);
    'Create a new document.
    Dim document As New PdfDocument()
    'Add a page.
    Dim page As PdfPage = document.Pages.Add()
    'Create document named destinations.
    Dim namedDestination As PdfNamedDestination = New PdfNamedDestination("Page 1");
    'Set the destination page.
    namedDestination.Destination = New PdfDestination(page)
    'Set the destination location.
    namedDestination.Destination.Location = New PointF(20, 20)
    'Add the named destination
    document.NamedDestinationCollection.Add(namedDestination)
    'Save and close the PDF document.
    document.Save("NamedDestinations.pdf")
    document.Close(True)

    Title

    Gets or sets the named destination title.

    Declaration
    public virtual string Title { get; set; }
    Property Value
    Type Description
    System.String

    A string value which contains the named destination title

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