public interface Line extends TextElement<String>, Serializable
The Line interface defines the contract for accessing and manipulating a line represented by a rectangle in the GroupDocs.Viewer component. It provides methods to retrieve information such as the line text, position, and size of the rectangle.
Example usage:
try (Viewer viewer = new Viewer("document.pdf")) {
PdfViewInfo viewInfo = (PdfViewInfo) viewer.getViewInfo(ViewInfoOptions.forHtmlView());
List<Line> lines = viewInfo.getPages().get(0).getLines();
for (Line line : lines) {
// Use the line object for further operations
}
}
Note: The default implementation of this interface is LineImpl.
Viewer,
PdfViewInfo,
ViewInfoOptions| Modifier and Type | Method and Description |
|---|---|
List<Word> |
getWords()
Retrieves the words contained in the line.
|
void |
setWords(List<Word> wordList)
Sets the words contained in the line.
|
Copyright © 2024. All rights reserved.