Table of Contents

Class PdfNamedDestination

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

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

public class PdfNamedDestination
Inheritance
PdfNamedDestination
Derived
Inherited Members

Constructors

PdfNamedDestination(string)

Initializes a new instance of the PdfNamedDestination class.

public PdfNamedDestination(string title)

Parameters

title string

The title to be displayed.

Properties

Destination

Gets or sets the named destination's destination.

public virtual PdfDestination Destination { get; set; }

Property Value

PdfDestination

The PdfDestination object is to be navigated.

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)

Remarks

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

Title

Gets or sets the named destination title.

public virtual string Title { get; set; }

Property Value

string

A string value which contains the named destination title