Skip to main content
.NET Framework 4.5.2+

PdfDocumentProcessor.CreateDestination(Int32, Single, Single, Single, Single, Single) Method

Creates a destination for targets in the document (e.g., bookmarks) using a page number, page coordinates, DPI and zoom factor.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Docs.v22.2.dll


public PdfDestination CreateDestination(
    int pageNumber,
    float x,
    float y,
    float dpiX,
    float dpiY,
    float zoomFactor


Name Type Description
pageNumber Int32

An integer value that is the page number where the destination is created.

x Single

A Single object that is the horizontal page coordinate value.

y Single

A Single object that is the vertical page coordinate value.

dpiX Single

A Single object that is the value, in dots per inch, for the horizontal resolution.

dpiY Single

A Single object that is the value, in dots per inch, for the vertical resolution.

zoomFactor Single

The zoom level by which a page destination is created.


Type Description

A PdfDestination object that is the page destination.


The overloaded CreateDestination method converts world coordinates to page coordinates. See the Coordinate Systems topic to learn more.

Use this method to create a destination that points to a specific location and view in a document. The created destination is assigned to the PdfBookmark.Destination property.

For more information about the bookmarks creation, see the Bookmarks topic.


This example shows how to create bookmarks with destinations in code:

View Example

using DevExpress.Pdf;

using (PdfDocumentProcessor processor = new PdfDocumentProcessor())
    // Load a document

    // 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
See Also