Please choose a menu option

PDF Search in a file

Description Find one or more matches of PDF text in a PDF file.
Jar Path org.jpedal.examples.text.FindTextInRectangle

Click for source code link

How to run the code

Windows: java -cp %jpedalDir%/jpedal.jar org/jpedal/examples/text/FindTextInRectangle inputValues
MacOS X Linux: java -cp $jpedalDir/jpedal.jar org/jpedal/examples/text/FindTextInRectangle inputValues

Click here for help on running Java programs from the command line

 

An explanation of the input values

This example expects two space delimited input values.

First value: The filename (including the path if needed) or a directory containing files. If it contains spaces it must be enclosed by double quotes (ie "C:/Path with spaces/").
Second value: This is the unicode text string to find.

 

Other details/screenshot

Finds the location of the first, or every instance of a value on a page. Searching starts from the top left corner and scans down the page, left to right.

 

Links to related articles

Search options describes the PDF search facilities JPedal offers to developers
Getting started tutorial
SimpleViewer - includes a comprehensive PDF search function.
Additional optional libraries lists items which may be needed for some PDF files or functionality.

 

Return to main PDF support section

Click here for the main PDF support area with lots of java examples, PDF tutorials and useful information to get the most out of the JPedal PDF library

 


PDF viewer