[ale] HOW2 search for text in a "PDF" file ?

Paul Boren pmboren at gmail.com
Thu Sep 1 10:49:18 EDT 2005


On 8/31/05, Geoffrey <esoteric at 3times25.net> wrote:
> Courtney Thomas wrote:
> > I can open the pdf files using xpdf, but what I need to do, [sorry for
> > the opaque description], is to search a DIR of pdf files, printing names
> > of those containing specified text.
> >
> > I can mount the CD of course but the 'controlling' files are *.exe...so
> > all I can do is search the pdf files, hopefully, since the menus, etc
> > are MS formats.
> 
> What about something like:
> 
> for fn in pdf/*.pdf; do
>         pdftotxt $fn - |grep "$textyourelookingfor" >/dev/null &&
>                 echo $fn contains $textyourelookingfor
> done
> 
> --
> Until later, Geoffrey
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale

I'd also suggest trying the lesspipe shell script as an imput filter.

http://www-zeuthen.desy.de/~friebel/unix/lesspipe.html

It's great for pdf, Microsoft Word, and other types of files, but
let's not start a resume-format thread again, okay? ;)

-- Paul



More information about the Ale mailing list