public final class PdfTextExtractor extends Object
Modifier | Constructor and Description |
---|---|
private |
PdfTextExtractor()
This class only contains static methods.
|
Modifier and Type | Method and Description |
---|---|
static String |
getTextFromPage(PdfReader reader,
int pageNumber)
Extract text from a specified page using the default strategy.
|
static String |
getTextFromPage(PdfReader reader,
int pageNumber,
TextExtractionStrategy strategy)
Extract text from a specified page using an extraction strategy.
|
private PdfTextExtractor()
public static String getTextFromPage(PdfReader reader, int pageNumber, TextExtractionStrategy strategy) throws IOException
reader
- the reader to extract text frompageNumber
- the page to extract text fromstrategy
- the strategy to use for extracting textIOException
- if any operation fails while reading from the provided PdfReaderpublic static String getTextFromPage(PdfReader reader, int pageNumber) throws IOException
Note: the default strategy is subject to change. If using a specific strategy
is important, use getTextFromPage(PdfReader, int, TextExtractionStrategy)
reader
- the reader to extract text frompageNumber
- the page to extract text fromIOException
- if any operation fails while reading from the provided PdfReaderWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses