public class PdfTextExtractor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private SimpleTextExtractingPdfContentStreamProcessor |
extractionProcessor
The processor that will extract the text.
|
private PdfReader |
reader
The PdfReader that holds the PDF file.
|
Constructor and Description |
---|
PdfTextExtractor(PdfReader reader)
Creates a new Text Extractor object.
|
Modifier and Type | Method and Description |
---|---|
private byte[] |
getContentBytesForPage(int pageNum)
Gets the content stream of a page.
|
java.lang.String |
getTextFromPage(int page)
Gets the text from a page.
|
private final PdfReader reader
private final SimpleTextExtractingPdfContentStreamProcessor extractionProcessor
public PdfTextExtractor(PdfReader reader)
reader
- the reader with the PDFprivate byte[] getContentBytesForPage(int pageNum) throws java.io.IOException
pageNum
- the page number of page you want get the content stream fromjava.io.IOException
public java.lang.String getTextFromPage(int page) throws java.io.IOException
page
- the page number of the pagejava.io.IOException