GdPicture.NET.14.API
GdPicture14 Namespace / GdPicturePDF Class / NewActionGoTo Method / NewActionGoTo(PdfDestinationType,Int32,Single,Single,Single,Single,Single,Boolean,Boolean) Method
A member of the PdfDestinationType enumeration. Sets up a particular view of a destination page specified by the Page parameter.
The destination page number in the current document. It must be a value from 1 to GdPicturePDF.GetPageCount.
The horizontal (left) coordinate of the document window's position according to the specified DestinationType parameter. The value of this coordinate is expressed in the currently set units according to the currently used coordinate space, see the Remarks section below.
The horizontal (right) coordinate of the document window's position according to the specified DestinationType parameter. The value of this coordinate is expressed in the currently set units according to the currently used coordinate space, see the Remarks section below.
The vertical (bottom) coordinate of the document window's position according to the specified DestinationType parameter. The value of this coordinate is expressed in the currently set units according to the currently used coordinate space, see the Remarks section below.
The vertical (top) coordinate of the document window's position according to the specified DestinationType parameter. The value of this coordinate is expressed in the currently set units according to the currently used coordinate space, see the Remarks section below.
The zoom factor to use when displaying the destination page according to the DestinationType configuration. Please use the value of 1 to represent the 100% zoom, Set to true if you want the action to retain actual left coordinate (Left parameter is ignored), otherwise set to false.Set to true if you want the action to retain actual top coordinate (Top parameter is ignored), otherwise set to false. 2 means 200%, 0,5 means 50%, etc. The value of 0 means that the current zoom value should remain unchanged.
Set to true if you want the action to retain actual left coordinate (Left parameter is ignored), otherwise set to false.
Set to true if you want the action to retain actual top coordinate (Top parameter is ignored), otherwise set to false.
Example





In This Topic
NewActionGoTo(PdfDestinationType,Int32,Single,Single,Single,Single,Single,Boolean,Boolean) Method
In This Topic
Creates a new action of the type GoTo. A go-to action changes the view to a specified destination (page, location, and magnification factor) in the currently loaded PDF document.
Syntax
'Declaration
 
Public Overloads Function NewActionGoTo( _
   ByVal DestinationType As PdfDestinationType, _
   ByVal Page As Integer, _
   ByVal Left As Single, _
   ByVal Right As Single, _
   ByVal Bottom As Single, _
   ByVal Top As Single, _
   ByVal Zoom As Single, _
   ByVal RetainLeft As Boolean, _
   ByVal RetainTop As Boolean _
) As Integer
public int NewActionGoTo( 
   PdfDestinationType DestinationType,
   int Page,
   float Left,
   float Right,
   float Bottom,
   float Top,
   float Zoom,
   bool RetainLeft,
   bool RetainTop
)
public function NewActionGoTo( 
    DestinationType: PdfDestinationType;
    Page: Integer;
    Left: Single;
    Right: Single;
    Bottom: Single;
    Top: Single;
    Zoom: Single;
    RetainLeft: Boolean;
    RetainTop: Boolean
): Integer; 
public function NewActionGoTo( 
   DestinationType : PdfDestinationType,
   Page : int,
   Left : float,
   Right : float,
   Bottom : float,
   Top : float,
   Zoom : float,
   RetainLeft : boolean,
   RetainTop : boolean
) : int;
public: int NewActionGoTo( 
   PdfDestinationType DestinationType,
   int Page,
   float Left,
   float Right,
   float Bottom,
   float Top,
   float Zoom,
   bool RetainLeft,
   bool RetainTop
) 
public:
int NewActionGoTo( 
   PdfDestinationType DestinationType,
   int Page,
   float Left,
   float Right,
   float Bottom,
   float Top,
   float Zoom,
   bool RetainLeft,
   bool RetainTop
) 

Parameters

DestinationType
A member of the PdfDestinationType enumeration. Sets up a particular view of a destination page specified by the Page parameter.
Page
The destination page number in the current document. It must be a value from 1 to GdPicturePDF.GetPageCount.
Left
The horizontal (left) coordinate of the document window's position according to the specified DestinationType parameter. The value of this coordinate is expressed in the currently set units according to the currently used coordinate space, see the Remarks section below.
Right
The horizontal (right) coordinate of the document window's position according to the specified DestinationType parameter. The value of this coordinate is expressed in the currently set units according to the currently used coordinate space, see the Remarks section below.
Bottom
The vertical (bottom) coordinate of the document window's position according to the specified DestinationType parameter. The value of this coordinate is expressed in the currently set units according to the currently used coordinate space, see the Remarks section below.
Top
The vertical (top) coordinate of the document window's position according to the specified DestinationType parameter. The value of this coordinate is expressed in the currently set units according to the currently used coordinate space, see the Remarks section below.
Zoom
The zoom factor to use when displaying the destination page according to the DestinationType configuration. Please use the value of 1 to represent the 100% zoom, Set to true if you want the action to retain actual left coordinate (Left parameter is ignored), otherwise set to false.Set to true if you want the action to retain actual top coordinate (Top parameter is ignored), otherwise set to false. 2 means 200%, 0,5 means 50%, etc. The value of 0 means that the current zoom value should remain unchanged.
RetainLeft
Set to true if you want the action to retain actual left coordinate (Left parameter is ignored), otherwise set to false.
RetainTop
Set to true if you want the action to retain actual top coordinate (Top parameter is ignored), otherwise set to false.

Return Value

The unique action identifier of the newly created action of the type GoTo. The GdPicturePDF.GetStat method can be subsequently used to determine if this method has been successful.

You can subsequently apply this identifier when creating actions using these methods: GdPicturePDF.SetViewerOpenAction, GdPicturePDF.SetBookmarkAction, GdPicturePDF.SetAnnotationAction or GdPicturePDF.SetFormFieldAction.

Remarks
This method is only allowed for use with non-encrypted documents.

It is recommend to use the GdPicturePDF.GetStat method to identify the specific reason for the method's failure, if any.

All values of the coordinates are expressed in the current units defined by the GdPicturePDF.SetMeasurementUnit method according to the current coordinate space defined by the GdPicturePDF.SetOrigin method.

Example

See Also