public final class PdfTextExtractor
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getTextFromPage(PdfReader reader,
int pageNumber)
Extract text from a specified page using the default strategy.
|
static java.lang.String |
getTextFromPage(PdfReader reader,
int pageNumber,
TextExtractionStrategy strategy)
Extract text from a specified page using an extraction strategy.
|
public static java.lang.String getTextFromPage(PdfReader reader, int pageNumber, TextExtractionStrategy strategy) throws java.io.IOException
reader - the reader to extract text frompageNumber - the page to extract text fromstrategy - the strategy to use for extracting textjava.io.IOException - if any operation fails while reading from the provided PdfReaderpublic static java.lang.String getTextFromPage(PdfReader reader, int pageNumber) throws java.io.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 fromjava.io.IOException - if any operation fails while reading from the provided PdfReaderCopyright © 2013. All Rights Reserved.