![]() |
||
Home Products Purchase Downloads Demos Forums Blogs Ticket Wiki API Corporate |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.pdf.kit.PdfSearcher
Represents a class to search text from pdf file.
Constructor Summary | |
PdfSearcher()
The constructor of the PdfSearcher object. |
Method Summary | |
void |
bindPdf(java.io.InputStream inputStream)
Binds a Pdf Stream for search. |
void |
bindPdf(java.lang.String inputFile)
Binds a Pdf file for search. |
int |
getEndPage()
Gets endPage value. |
java.util.Map |
getMatchText()
Gets all match text points within the rectangle. |
int |
getStartPage()
Gets startPage value. |
void |
searchTextInRectangle(java.awt.Rectangle rec,
java.lang.String textToSearch)
Searchs the location of the textToSearch within the rectangle from startPage to endPage. |
void |
setEndPage(int endPage)
Sets endPage value. |
void |
setStartPage(int startPage)
Sets startPage value. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PdfSearcher()
Method Detail |
public void setStartPage(int startPage)
startPage
- start position which you want to search of the pdf file.public int getStartPage()
public void setEndPage(int endPage)
endPage
- end position which you want to search of the pdf file.public int getEndPage()
public void bindPdf(java.lang.String inputFile) throws java.io.FileNotFoundException
inputFile
- The pdf file to be searched.
java.io.FileNotFoundException
public void bindPdf(java.io.InputStream inputStream)
inputStream
- The pdf Stream to be searched.
java.io.FileNotFoundException
public void searchTextInRectangle(java.awt.Rectangle rec, java.lang.String textToSearch) throws PdfViewerException, java.lang.Exception
rec
- java.awt.Rectangle the rectangle which extracted the texts.
The coordinate origin is (0,0) which is the pdf file top left
point. The rec.width is the extraction text width and the
rec.height is the extraction text height.textToSearch
- String the text to search.
PdfViewerException
java.lang.Exception
public java.util.Map getMatchText() throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |