Class PdfNamedDestination
Represents an named destination which goes to a destination in the current document.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class PdfNamedDestination : 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 |