1833535 Members
3353 Online
110061 Solutions
New Discussion

grep pdf files

 
SOLVED
Go to solution
Volker Borowski
Honored Contributor

grep pdf files

Hi,

anyone aware of a tool that allows to search pdf files from the command line?

pdfgrep -e 'my search text' *.pdf

would be a nice way to call it.

Should not cost an arm and a leg :-)
Free trial version would be nice.

Thanks
Volker
7 REPLIES 7
Pete Randall
Outstanding Contributor

Re: grep pdf files

Volker,

I've never tried it, but wouldn't printing the pdf and piping it to grep work??

croread -toPostScript | lp


Pete

Pete
Pete Randall
Outstanding Contributor

Re: grep pdf files

Sorry, meant to say:

croread -toPostScript | grep -e 'my search text'


Pete

Pete
Richard Darling
Trusted Contributor

Re: grep pdf files

check out:

http://www.pdf-tools.com/asp/products.asp?name=CLS&type=shell

I think they have everything you need...free to evaluate, but not cheap - 360 for a license.
RD
Pete Randall
Outstanding Contributor

Re: grep pdf files

I guess my cutting and pasting skills need an upgrade. In case you hadn't guessed, I was trying to say:

acroread -toPostScript | grep -e 'my search text'


Pete

Pete
Volker Borowski
Honored Contributor

Re: grep pdf files

@Richard: That one loks nice, but is quite a bit overdosed for what I need and by far too expensive.
Nevertheless, if i do not find a better solution, I'll try the evaluation at least to see if it fit's my needs. Thanks.

@Pete: The *.pdf files are currently dropping out of an application and are some kind of logfiles. I have the usual reader for windows on my PC, but not on my monitoring system, which is supposed to ring a bell in case of special messages.
I'll check where to get this thing for UNIX.

Volker
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: grep pdf files

How about free?

http://hpux.its.tudelft.nl/hppd/hpux/PostScript/pstotext-1.7/

and then pipe the output to grep and you are done.
If it ain't broke, I can fix that.
Volker Borowski
Honored Contributor

Re: grep pdf files

Perfect Clay.

I was not aware, that this tool handles PDF as well, I always had this one in mind only as a postScript converter.

(and I have it already installed. Sorry Pete, but this gives the rabbit to Clay :-)

Thanks a lot.
Volker