Well, I have not gone through whole code but I am sure that this is perfectly working for me & I hope it will also work for you.
Here is the sample output of search within PDF Document.
Step 1 ) Grab the sample code from here.
Step 2) Open the downloaded sample code.
Step 3) Run the project & you would find the expected output.
I tried to understand the code, but its too complex to understand within very short time.