JPedal 4.74b27 Click here for Tutorials, code examples, help forums and support

org.jpedal.examples.text
Class FindTextInRectangle

java.lang.Object
  extended by org.jpedal.examples.text.FindTextInRectangle

public class FindTextInRectangle
extends java.lang.Object

Sample code showing how jpedal library can be used with pdf files to find text from a specified Rectangle. Can XML file of the output. Debugging tip: Set verbose=true in LogWriter to see what is going on.


Constructor Summary
FindTextInRectangle()
           
FindTextInRectangle(java.lang.String file_name, java.lang.String textToFind)
          example method to open a file and extract the raw text
FindTextInRectangle(java.lang.String file_name, java.lang.String textToFind, int[] areaToScan)
          example method to open a file and extract the raw text
 
Method Summary
 void createFileXMLElement(java.lang.String filePath, boolean open)
           
 void createFindXMLElement(float x, float y, int pageNo)
           
 void createXMLFile(boolean open)
           
 float[] getCoords()
           
static void main(java.lang.String[] args)
          main routine which checks for any files passed and runs the demo
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FindTextInRectangle

public FindTextInRectangle()

FindTextInRectangle

public FindTextInRectangle(java.lang.String file_name,
                           java.lang.String textToFind)
example method to open a file and extract the raw text


FindTextInRectangle

public FindTextInRectangle(java.lang.String file_name,
                           java.lang.String textToFind,
                           int[] areaToScan)
example method to open a file and extract the raw text

Method Detail

getCoords

public float[] getCoords()

createXMLFile

public void createXMLFile(boolean open)
Parameters:
open - True to create a new XML file. False to close tags on the new file.

createFileXMLElement

public void createFileXMLElement(java.lang.String filePath,
                                 boolean open)
Parameters:
filePath - The contents of the files element
open - True if a the opening of element is required, otherwise close a file element

createFindXMLElement

public void createFindXMLElement(float x,
                                 float y,
                                 int pageNo)

main

public static void main(java.lang.String[] args)
main routine which checks for any files passed and runs the demo


JPedal 4.74b27 Click here for Tutorials, code examples, help forums and support

JPedal 4.74b27 Click here for Tutorials, code examples, help forums and support