Show / Hide Table of Contents

Class Destination

A destination defines a particular view of a document, consisting of the following:

  • The page of the document to be displayed
  • The location of the document window on that page
  • The magnification (zoom) factor to use when displaying the page
Destinations may be associated with Bookmarks, Annotations, and Remote Go-To Actions.

Destination is a utility class used to simplify work with PDF Destinations; Please refer to section 8.2.1 'Destinations' in PDF Reference Manual for details.

Inheritance
System.Object
Destination
Implements
System.IDisposable
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.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: pdftron.PDF
Assembly: PDFNetiOS.dll
Syntax
public class Destination : IDisposable

Constructors

Destination(Obj)

Instantiates Destination from given SDF::Obj object

Declaration
public Destination(Obj dest)
Parameters
Type Name Description
Obj dest

SDF::Obj destination object

Methods

CreateFit(Page)

Create a new 'Fit' Destination.

The new Destination displays the page designated by 'page', with its contents magnified just enough to fit the entire page within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the page within the window in the other dimension.

Declaration
public static Destination CreateFit(Page page)
Parameters
Type Name Description
Page page

the page

Returns
Type Description
Destination

the destination

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

CreateFitB(Page)

Create a new 'FitB' Destination.

The new Destination displays the page designated by 'page', with its contents magnified just enough to fit its bounding box entirely within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the bounding box within the window in the other dimension.

Declaration
public static Destination CreateFitB(Page page)
Parameters
Type Name Description
Page page

the page

Returns
Type Description
Destination

the destination

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

CreateFitBH(Page, Double)

Create a new 'FitBH' Destination.

The new Destination displays the page designated by 'page', with the vertical coordinate 'top' positioned at the top edge of the window and the contents of the page magnified just enough to fit the entire width of its bounding box within the window.

Declaration
public static Destination CreateFitBH(Page page, double top)
Parameters
Type Name Description
Page page

the page

System.Double top

the top

Returns
Type Description
Destination

the destination

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

CreateFitBV(Page, Double)

Create a new 'FitBV' Destination.

The new Destination displays Display the page designated by 'page', with the horizontal coordinate 'left' positioned at the left edge of the window and the contents of the page magnified just enough to fit the entire height of its bounding box within the window.

Declaration
public static Destination CreateFitBV(Page page, double left)
Parameters
Type Name Description
Page page

the page

System.Double left

the left

Returns
Type Description
Destination

the destination

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

CreateFitH(Page, Double)

Create a new 'FitH' Destination.

The new Destination displays the page designated by 'page', with the vertical coordinate 'top' positioned at the top edge of the window and the contents of the page magnified just enough to fit the entire width of the page within the window.

Declaration
public static Destination CreateFitH(Page page, double top)
Parameters
Type Name Description
Page page

the page

System.Double top

the top

Returns
Type Description
Destination

the destination

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

CreateFitR(Page, Double, Double, Double, Double)

Create a new 'FitR' Destination.

The new Destination displays the page designated by 'page', with its contents magnified just enough to fit the rectangle specified by the coordinates 'left', 'bottom', 'right', and 'top' entirely within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the rectangle within the window in the other dimension.

Declaration
public static Destination CreateFitR(Page page, double left, double bottom, double right, double top)
Parameters
Type Name Description
Page page

the page

System.Double left

the left

System.Double bottom

the bottom

System.Double right

the right

System.Double top

the top

Returns
Type Description
Destination

the destination

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

CreateFitV(Page, Double)

Create a new 'FitV' Destination.

The new Destination displays the page designated by 'page', with the horizontal coordinate 'left' positioned at the left edge of the window and the contents of the page magnified just enough to fit the entire height of the page within the window.

Declaration
public static Destination CreateFitV(Page page, double left)
Parameters
Type Name Description
Page page

the page

System.Double left

the left

Returns
Type Description
Destination

the destination

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

CreateXYZ(Page, Double, Double, Double)

Create a new 'XYZ' Destination.

The new Destination displays the page designated by 'page', with the coordinates ('left', 'top') positioned at the top-left corner of the window and the contents of the page magnified by the factor 'zoom'. A null value for any of the parameters 'left', 'top', or 'zoom' specifies that the current value of that parameter is to be retained unchanged. A 'zoom' value of 0 has the same meaning as a null value.

Declaration
public static Destination CreateXYZ(Page page, double left, double top, double zoom)
Parameters
Type Name Description
Page page

the page

System.Double left

the left

System.Double top

the top

System.Double zoom

the zoom

Returns
Type Description
Destination

the destination

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

Dispose()

Declaration
public void Dispose()

Dispose(Boolean)

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

Finalize()

Releases all resources used by the Destination

Declaration
protected void Finalize()

GetExplicitDestObj()

Gets the explicit dest obj.

Declaration
public Obj GetExplicitDestObj()
Returns
Type Description
Obj

the explicit destination SDF/Cos object. This is always an Array as shown in Table 8.2 in PDF Reference Manual.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

GetFitType()

Gets the fit type.

Declaration
public Destination.FitType GetFitType()
Returns
Type Description
Destination.FitType

destination's FitType.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

GetPage()

Gets the page.

Declaration
public Page GetPage()
Returns
Type Description
Page

the Page that this destination refers to.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

GetSDFObj()

Gets the SDFObj.

Declaration
public Obj GetSDFObj()
Returns
Type Description
Obj

the object to the underlying SDF/Cos object. The returned SDF/Cos object is an explicit destination (i.e. the Obj is either an array defining the destination, using the syntax shown in Table 8.2 in PDF Reference Manual), or a dictionary with a 'D' entry whose value is such an array. The latter form allows additional attributes to be associated with the destination

IsValid()

Checks if is valid.

Declaration
public bool IsValid()
Returns
Type Description
System.Boolean

True if this is a valid Destination and can be resolved, false otherwise.

Remarks

If this method returns false the underlying SDF/Cos object is null and the Action object should be treated as null as well.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

op_Assign(Destination)

Assignment operator

Declaration
public Destination op_Assign(Destination r)
Parameters
Type Name Description
Destination r

Destination object at the right of the operator

Returns
Type Description
Destination

Destination object equals to the specified object

Set(Destination)

Sets value to given Destination object

Declaration
public void Set(Destination p)
Parameters
Type Name Description
Destination p

given Destination object

SetPage(Page)

Modify the destination so that it refers to the new 'page' as the destination page.

Declaration
public void SetPage(Page page)
Parameters
Type Name Description
Page page

The new page associated with this Destination.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

Implements

System.IDisposable
In This Article
Back to top Generated by DocFX