public class PdfSearchUtils extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
PdfSearchUtils(PdfData pdf_data) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearStoredTeasers() |
protected float[] |
findText(int x1,
int y1,
int x2,
int y2,
String[] terms,
int searchType)
Search a particular area with in pdf page currently loaded and return the areas
of the results found as an array of float values.
|
protected float[] |
findText(String[] terms,
int searchType)
Search with in pdf page currently loaded and return the areas
of the results found as an array of float values.
|
protected void |
generateTeasers(boolean value)
Flag if teasers should be generated whilst searching
|
protected String[] |
getTeasers()
return text teasers from findtext if generateTeasers() called before find
|
protected boolean |
isGeneratingTeasers()
Return flag to control teaser generation
|
protected void |
setIncludeHTML(boolean value)
sets if we include HTML in teasers
(do we want this is word or this is word as teaser)
|
protected PdfSearchUtils(PdfData pdf_data)
protected final float[] findText(int x1,
int y1,
int x2,
int y2,
String[] terms,
int searchType)
throws PdfException
x1 - is the x coord of the top left cornery1 - is the y coord of the top left cornerx2 - is the x coord of the bottom right cornery2 - is the y coord of the bottom right cornerterms - : String[] of search terms, each String is treated as a single termsearchType - : int containing bit flags for the search (See class SearchType)PdfException - if the page content being search contains invalid data that the search can not recover fromprotected String[] getTeasers()
protected final float[] findText(String[] terms, int searchType) throws PdfException
Method to find text in the specified area allowing for the text to be split across multiple lines.
terms - = the text to search forsearchType - = info on how to search the pdfPdfException - if the page content being search contains invalid data that the search can not recover fromprotected void clearStoredTeasers()
protected void setIncludeHTML(boolean value)
value - True to include HTML, otherwise falseprotected void generateTeasers(boolean value)
value - True to generate teasers, otherwise falseprotected boolean isGeneratingTeasers()
Copyright © 2017. All rights reserved.