Quite often in recent years the OS X Finder search has let me down, not displaying file names that match a search string. Going round and round with Apple support has not created satisfactory results. It is as if the Spotlight database is incomplete or searching for words in a file name do not bring up the desired file names.
Searching for an alternative led me to EasySearch (5.0) and it is a pretty good solution for locating file names. It is like the command line find
but with the ability to use QuickLook plugins to preview a file.
My current need is to be able to search PDFs in a directory with multiple folders below (recursively). EasyFind will do this. However, I would like to be able to preview the page with the matching text. The usual behavior is to show the first page of the PDF. I can open in Apple Preview and search there but this is tedious and doesn’t always work, especially if my phrase spans lines in the PDF.
I have installed the command-line tool pdfgrep
via brew
and it can work OK for showing results:
pdfgrep -nC2 “search phrase” filename.pdf
The C2 option shows context with a line or two before and after the matching line. The n shows the page number where “search phrase” was found in filename.pdf.
So, since EasyFind can use QuickLook plugins, would it be possible to have a QuickLook plugin made that can use pdfgrep to show the snippet of the page that has the search string? There are a variety of ways this could be done — a couple lines of text like the pdfgrep
output or showing the page image with the text highlighted. The main thing is that I want to look at my EasyFind list and walk through the results and see the match(es).
My PDFs are magazines and when I search for a phrase, I want to be able to differentiate articles from ads that mention the phrase.
James D. Keeline