in reply to Comparison word against pdf

If (!) it's possible to extract text¹ from PDF I'm using pdftohtml -xml and then I'm parsing the resulting xml by text position.

see Parsing PDFs by text position?

Cheers Rolf

( addicted to the Perl Programming Language)

¹) some PDF formats use internal bitmaps for fonts such that only OCR would help.