public class TextContent extends Object
Constructor and Description |
---|
TextContent(PDFPage page)
Create a new TextContent object from a PDFPage.
|
Modifier and Type | Method and Description |
---|---|
<T extends Span> |
getSpans(Class<T> groupBy)
Gets a list of Spans that each share a common attribute.
|
public TextContent(PDFPage page) throws PDFException
page
- The page that contains the text.PDFException
- if there is an error getting page content.public <T extends Span> List<T> getSpans(Class<T> groupBy)
groupBy
- The type of span to group by. Must be a subclass of
Span
FillColorSpan.class will group text into Spans of text based on text
fill color.
LineSpan.class will group text into lines as they appear on the page.