I've done something similar with a .html and .xml file before but I'm not sure about .pdf.
I opened the file and read through it a line at a time at searched the string as I went.
From memory it was something like this:
fname = "C;\path\"mttextfile.txt Close 'closes file if stuck open
Open fname For Input Access Read As FreeFile
Do While Not EOF(1)
Line Input #1, textline
If Instr (1, textline, "the") > 0 Then
...do something here....