All Implemented Interfaces:
com.groupdocs.viewer.results.TextElement, java.io.Serializable
public interface Word extends TextElement<String>, Serializable
Represents a relatively positioned rectangle that contains a single word.
The Word interface represents a word within a relatively positioned rectangle in the GroupDocs.Viewer component. It extends the TextElement interface and provides additional methods to access and manipulate the word content.
Example usage:
try (Viewer viewer = new Viewer("document.pdf")) {
PdfViewInfo viewInfo = (PdfViewInfo) viewer.getViewInfo(ViewInfoOptions.forHtmlView());
List words = viewInfo.getPages().get(0).getLines().get(0).getWords();
for (Word word : words) {
// Use the word object for further operations
}
}
Note: The default implementation of this interface is WordImpl.