getSelectedTextItems Method

Summary

Selected text of a page as a list of DocumentViewerTextItem.

Syntax
TypeScript
JavaScript
DocumentViewerText.prototype.getSelectedTextItems = function( 
   pageNumber 
) 
getSelectedTextItems( 
   pageNumber: number 
): DocumentViewerTextItem[]; 

Parameters

pageNumber

Page number to use. This value cannot be 0.

Return Value

An array of the currently selected text items of the page, or null if the page does not have any selected text.

Remarks

DocumentViewerText stores the state of the current text selection internally. Use GetSelectedText to obtain the selected text as a simple string object and GetSelectedTextItems to obtain this value as an array of DocumentViewerTextItem that contains information on the character range of the selection in the corresponding DocumentPageText and the total boundary of the selection in document units.

When RenderSelection is true, DocumentViewerView calls GetSelectedTextItems to highlight the selected text on the ImageViewer object.

Requirements

Target Platforms

Help Version 20.0.2019.10.14
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2019 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Document.Viewer Assembly