Click or drag to resize

Destination Class

A utility method used to set the fist page displayed after the document is opened. This method is equivalent to PDFDoc::SetOpenAction(goto_action) If OpenAction is not specified the document should be opened to the top of the first page at the default magnification factor.
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 Hierarchy
SystemObject
  pdftron.PDFDestination

Namespace:  pdftron.PDF
Assembly:  pdftron (in pdftron.dll) Version: 255.255.255.255
Syntax
public sealed class Destination : IClosable

The Destination type exposes the following members.

Constructors
  NameDescription
Public methodDestination
Instantiates Destination from given SDF::Obj object
Top
Methods
  NameDescription
Public methodClose
Public methodStatic memberCreateFit
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.
Public methodStatic memberCreateFitB
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.
Public methodStatic memberCreateFitBH
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.
Public methodStatic memberCreateFitBV
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.
Public methodStatic memberCreateFitH
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.
Public methodStatic memberCreateFitR
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.
Public methodStatic memberCreateFitV
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.
Public methodStatic memberCreateXYZ
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.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetExplicitDestObj
Gets the explicit dest obj.
Public methodGetFitType
Gets the fit type.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetPage
Gets the page.
Public methodGetSDFObj
Gets the SDFObj.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsValid
Checks if is valid.
Public methodSet
Sets value to given Destination object
Public methodSetPage
Modify the destination so that it refers to the new 'page' as the destination page.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Examples
Destination dest = Destination::CreateFit(page);
pdfdoc.GetViewPrefs().SetInitialPage(dest);
See Also