←Select platform

GetPageTextItems Method

Summary

Extracts a DocumentViewerMultiLineTextItem between two positions.

Syntax
C#
VB
C++
Public Function GetPageTextItems( 
   ByVal begin As DocumentViewerTextPosition, 
   ByVal end As DocumentViewerTextPosition 
) As DocumentViewerMultiLineTextItem 

Parameters

begin

A DocumentViewerTextPosition indicating the beginning of the range. Should not be null. Must include a valid page number.

end

A DocumentViewerTextPosition indicating the end of the range. Should not be null. Must include a valid page number.

Return Value

A DocumentViewerMultiLineTextItem encompassing the range between the two parameter positions.

Remarks

GetPageTextItems takes a start and end DocumentViewerTextPosition and returns a list of DocumentViewerTextItem within a DocumentViewerMultiLineTextItem. This return value can be later supplied to SetSelectedTextItems or to ImageViewer.EnsureBoundsVisible.

If null is passed for either parameter, null is returned immediately. The method will check for valid page numbers in the Document, and then continue. The result is then guaranteed to be a DocumentViewerMultiLineTextItem, but DocumentViewerMultiLineTextItem.TextItems will be null if no DocumentViewerTextItem are found between the positions.

Each page between (and including) the given DocumentViewerTextPosition.PageNumber of begin and end is checked. If the DocumentViewerTextPosition.PageNumber of begin is greater than that of end, no DocumentViewerTextItem instances will be added to DocumentViewerMultiLineTextItem.TextItems. In other words, parameters are expected to be in order.

If the checked DocumentPageText is null or has no text, it is skipped.

History

19.0.0.49
Added

Requirements

Target Platforms

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

Leadtools.Document.Viewer.WinForms Assembly