|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pdfbox.util.PDFStreamEngine
org.apache.pdfbox.util.PDFTextStripper
org.apache.pdfbox.util.PDFHighlighter
public class PDFHighlighter
Highlighting of words in a PDF document with an XML file.
Field Summary |
---|
Fields inherited from class org.apache.pdfbox.util.PDFTextStripper |
---|
charactersByArticle, document, output, outputEncoding, systemLineSeparator |
Constructor Summary | |
---|---|
PDFHighlighter()
Default constructor. |
Method Summary | |
---|---|
protected void |
endPage(PDPage pdPage)
End a page. |
void |
generateXMLHighlight(PDDocument pdDocument,
java.lang.String[] sWords,
java.io.Writer xmlOutput)
Generate an XML highlight string based on the PDF. |
void |
generateXMLHighlight(PDDocument pdDocument,
java.lang.String highlightWord,
java.io.Writer xmlOutput)
Generate an XML highlight string based on the PDF. |
static void |
main(java.lang.String[] args)
Command line application. |
Methods inherited from class org.apache.pdfbox.util.PDFStreamEngine |
---|
getColorSpaces, getCurrentPage, getFonts, getGraphicsStack, getGraphicsState, getGraphicsStates, getResources, getTextLineMatrix, getTextMatrix, getTotalCharCnt, getValidCharCnt, getXObjects, isForceParsing, processEncodedText, processOperator, processOperator, processStream, processSubStream, registerOperatorProcessor, setColorSpaces, setFonts, setForceParsing, setGraphicsStack, setGraphicsState, setGraphicsStates, setTextLineMatrix, setTextMatrix |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PDFHighlighter() throws java.io.IOException
java.io.IOException
- If there is an error constructing this class.Method Detail |
---|
public void generateXMLHighlight(PDDocument pdDocument, java.lang.String highlightWord, java.io.Writer xmlOutput) throws java.io.IOException
pdDocument
- The PDF to find words in.highlightWord
- The word to search for.xmlOutput
- The resulting output xml file.
java.io.IOException
- If there is an error reading from the PDF, or writing to the XML.public void generateXMLHighlight(PDDocument pdDocument, java.lang.String[] sWords, java.io.Writer xmlOutput) throws java.io.IOException
pdDocument
- The PDF to find words in.sWords
- The words to search for.xmlOutput
- The resulting output xml file.
java.io.IOException
- If there is an error reading from the PDF, or writing to the XML.protected void endPage(PDPage pdPage) throws java.io.IOException
endPage
in class PDFTextStripper
pdPage
- The page we are about to process.
java.io.IOException
- If there is any error writing to the stream.public static void main(java.lang.String[] args) throws java.io.IOException
args
- The command line arguments to the application.
java.io.IOException
- If there is an error generating the highlight file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |