I want to search a word like fooonetwo in one pdf. So the point is I do not know the real ward is foo_one_two or foo.one.two or foo-one-two or foo-one_two! or ... .

Or better to say I want to search for words which at the same time include foo and one and two. So I remember in the database we have kind of this feature : For example a query for looking for words which start by foo and also include one and two. So is there any PDF viewer to do that? What PDF viewer and how to do that.


You could use pdfgrep to search inside .pdf files using patterns. First you have to install pdfgrep package,

 sudo apt-get install pdfgrep

And your command should be,

pdfgrep -in 'foo.one.two' file.pdf

Dot inside the above pattern will match any character(It doesn't represent a literal dot). So it will find foo.one.two,foo-one-two,foo_one_two.


pdfgrep -in pattern file.pdf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.