Build a list of the words found in the document page.
DocumentPageText.prototype.buildWords = function()
The text words are created from the characters found in the document based on the IsEndOfWord returned by document parsing engine. Whenever an "end of word" is found, the last set of characters are grouped together and stored as an item in the Words list. This is not performed automatically, instead, you must call BuildWords to populate the Words list from the Characters.
The following explains how this method works. If the page text consists of the following string
Hello World, then
the text parser engine will populate Characters as follows (ignoring Bounds):
BuildWords will loop through each character till an item with IsEndOfWord equals to true
is reached, it will then create a word from the characters found so far, in this case from index 0 to 4. The characters are combined into
DocumentWord.Value (The string
Hello) and the union of these characters position and location
(DocumentCharacter.Bounds) are set into DocumentWord.Bounds. The
first index (0) and the last index (4) are set into DocumentWord.FirstCharacterIndex
The method then continues to the next character (index 5) and repeat the operation, this time using indices 5 and 9 and the result
is DocumentWord with DocumentWord.Value set to
set to 5 and LastCharacterIndex set to 9.
For more information, refer to Parsing Text with the Documents Library.
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.