Class GetPDFText
java.lang.Object
org.deltava.dao.file.DAO
org.deltava.dao.file.GetPDFText
A Data Access Object to extract text from a PDF document.
- Since:
- 9.0
- Version:
- 10.2
- Author:
- Luke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetText()Extracts the PDF document text.voidsetEndPage(int page) Updates the last page to extract.voidsetSortByPosition(boolean sbp) voidsetStartPage(int page) Updates the first page to extract.Methods inherited from class DAO
getReader, getStream, setBufferSizeModifier and TypeMethodDescriptionprotected LineNumberReaderReturns a reader suitable for text reads on the HTTP connection.protected InputStreamReturns the input stream used for input.voidsetBufferSize(int size) Sets the buffer size for the connection.
-
Constructor Details
-
GetPDFText
Initializes the Data Access Object.- Parameters:
is- the InputStream to read
-
-
Method Details
-
setStartPage
public void setStartPage(int page) Updates the first page to extract.- Parameters:
page- the page number
-
setEndPage
public void setEndPage(int page) Updates the last page to extract.- Parameters:
page- the page number
-
setSortByPosition
public void setSortByPosition(boolean sbp) -
getText
Extracts the PDF document text.- Returns:
- the PDF text
- Throws:
DAOException- if an I/O error occurs
-