PdfBookmark.Destination Property
Gets or sets a destination with which a bookmark is associated.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Pdf.v21.2.Core.dll
NuGet Package: DevExpress.Pdf.Core
Declaration
Property Value
Type | Description |
---|---|
PdfDestination | A destination. |
Remarks
A destination includes the following view parameters:
- The displayed document page
- The location of the document window on this page
- The magnification (zoom factor)
The table below lists available destinations and corresponding classes.
Destination | View Parameters | Class |
---|---|---|
FitB | Fit the page’s bounding box into the document window. | PdfFitBBoxDestination |
FitBH | Fit the page’s bounding box into the document window horizontally. | PdfFitBBoxHorizontallyDestination |
FitBV | Fit the page’s bounding box into the document window vertically. | PdfFitBBoxVerticallyDestination |
Fit | Fit the entire page into the document window. | PdfFitDestination |
FitH | Fit the entire page into the document window horizontally. | PdfFitHorizontallyDestination |
FitV | Fit the entire page into the document window vertically. | PdfFitVerticallyDestination |
FitR | Display the specified page area in the document window. | PdfFitRectangleDestination |
XYZ | Position the specified page coordinate at the top left corner of the document window and specify the zoom factor. | PdfXYZDestination |
Example
This example shows how to create bookmarks with destinations in code:
using DevExpress.Pdf;
using (PdfDocumentProcessor processor = new PdfDocumentProcessor())
{
// Load a document
processor.LoadDocument("..\\..\\Document.pdf");
// Create destinations
PdfDestination destination1 = processor.CreateDestination(1, 180, 150);
PdfDestination destination2 = processor.CreateDestination(1, 168, 230);
PdfDestination destination3 = processor.CreateDestination(1, 20, 350);
// Associate bookmarks with created destinations
processor.Document.Bookmarks.Add(new PdfBookmark()
{ Title = "PDF Document Processor", Destination = destination1 });
processor.Document.Bookmarks.Add(new PdfBookmark()
{ Title = "Display, Print and Export PDF Documents", Destination = destination2 });
processor.Document.Bookmarks.Add(new PdfBookmark()
{ Title = "Learn More", Destination = destination3 });
// Save the result document
processor.SaveDocument("..\\..\\Result.pdf");
}
See Also