A helper function for loosely determining if two DocumentViewerTextPosition objects are in order.
isInOrder = function(
minPosition,
maxPosition
)
static isInOrder(
minPosition: DocumentViewerTextPosition,
maxPosition: DocumentViewerTextPosition
): boolean;
minPosition
The DocumentViewerTextPosition that should be a lower page number and/or character index than maxPosition.
maxPosition
The DocumentViewerTextPosition that should be a higher page number and/or character index than minPosition.
true if the minPosition has an explicitly lower page number and/or character index than maxPosition; otherwise false.
IsInOrder indicates whether the two provided DocumentViewerTextPosition are in order from "lowest" to "highest" by PageNumber and then by CharacterIndex. If both page numbers are the same and if maxPosition has a CharacterIndex of -1
(indicating the end of a page), IsInOrder will return true; IsInOrder does not check against the actual last character in any document.
Pseudo-code:
if (minPosition.PageNumber < maxPosition.PageNumber)
return true;
else if (minPosition.PageNumber == maxPosition.PageNumber)
return (maxPosition.CharacterIndex == -1) || (minPosition.CharacterIndex != -1 && minPosition.CharacterIndex < maxPosition.CharacterIndex);
return false;
History
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
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.
Chat Hours:
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.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.