Error processing SSI file
LEADTOOLS Leadtools.Documents.UI (Leadtools.Documents.UI assembly)

Show in webframe

RunLinkTarget Method (DocumentViewer)






Properties of the link target to invoke
Invokes the specified document link target.
Syntax
public virtual void RunLinkTarget( 
   DocumentLinkTarget linkTarget
)
'Declaration
 
Public Overridable Sub RunLinkTarget( _
   ByVal linkTarget As DocumentLinkTarget _
) 
'Usage
 
Dim instance As DocumentViewer
Dim linkTarget As DocumentLinkTarget
 
instance.RunLinkTarget(linkTarget)
public:
virtual void RunLinkTarget( 
   DocumentLinkTarget linkTarget
) 

Parameters

linkTarget
Properties of the link target to invoke
Remarks

RunLinkTarget is called internally by the document viewer and can be invoked by the user to perform the action specified by a DocumentLinkTarget object.

It is called internally when any of the following occur:

The application can also create a custom DocumentLinkTarget that does not exist in the document and call RunLinkTarget manually.

In all cases, the following is performed:

If the value of PageNumber of linkTarget is 0, then the the current page is not changed, otherwise, if the value is not a valid page number, an exception is thrown.

Example

Start with the example created in DocumentViewer, remove all the code in the Example function and add the code below.

When the user clicks the Example button, we will go to page number 3 in the document and set the fit mode to "page width".

Copy Code  
Imports Leadtools
Imports Leadtools.Controls
Imports Leadtools.Documents
Imports Leadtools.Documents.UI
Imports Leadtools.Codecs
Imports Leadtools.Caching
Imports Leadtools.Annotations.Core
Imports Leadtools.Forms.Ocr

' Create a new DocumentLink
' First the target, goto page number 3 and fit width
Dim linkTarget As New DocumentLinkTarget()
linkTarget.PageNumber = 3
linkTarget.PageFitType = DocumentPageFitType.FitWidth
' Now the link, of type goto-page
Dim link As New DocumentLink()
link.LinkType = DocumentLinkType.TargetPage
link.Target = linkTarget
' Run this link
_documentViewer.RunLinkTarget(linkTarget)
using Leadtools;
using Leadtools.Controls;
using Leadtools.Documents;
using Leadtools.Documents.UI;
using Leadtools.Codecs;
using Leadtools.Caching;
using Leadtools.Annotations.Core;
using Leadtools.Forms.Ocr;

// Create a new DocumentLink
// First the target, goto page number 3 and fit width
var linkTarget = new DocumentLinkTarget();
linkTarget.PageNumber = 3;
linkTarget.PageFitType = DocumentPageFitType.FitWidth;
// Now the link, of type goto-page
var link = new DocumentLink();
link.LinkType = DocumentLinkType.TargetPage;
link.Target = linkTarget;
// Run this link
_documentViewer.RunLinkTarget(linkTarget);
Requirements

Target Platforms

See Also

Reference

DocumentViewer Class
DocumentViewer Members

Error processing SSI file
Leadtools.Documents.UI requires a Document or Medical toolkit license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features