public final class PdfTextExtractor
extends java.lang.Object
| Modifier and Type | Method | 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.
|
static java.lang.String |
getTextFromPage(PdfReader reader,
int pageNumber,
TextExtractionStrategy strategy,
java.util.Map<java.lang.String,ContentOperator> additionalContentOperators) |
Extract text from a specified page using an extraction strategy.
|
public static java.lang.String getTextFromPage(PdfReader reader, int pageNumber, TextExtractionStrategy strategy, java.util.Map<java.lang.String,ContentOperator> additionalContentOperators) throws java.io.IOException
reader - the reader to extract text frompageNumber - the page to extract text fromstrategy - the strategy to use for extracting textadditionalContentOperators - an optional map of custom ContentOperators for rendering instructionsjava.io.IOException - if any operation fails while reading from the provided PdfReaderpublic 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 © 1998–2018. All rights reserved.