PDFgrep text search (CLI)

Share interesting information or links related to portable apps here.

Moderators: usdcs, Andrew Lee, webfork

Post Reply
Posts: 433
Joined: Wed Jun 26, 2013 2:09 am

PDFgrep text search (CLI)

#1 Post by __philippe » Thu Oct 05, 2017 8:45 am

PDFgrep (CLI utility) ...alternative to firing up cumbersome Acrobat/Foxit... :wink:

Nifty utility to swiftly Search text inside PDF file(s); Works much like grep, except it operates on pages instead of lines.

Simple usage:
    PDFgrep file searchstring

Can also search inside a bunch of pdf files at once:
    PDFgrep -r --include *.pdf searchstring

Can even return the relevant page number hit
    PDFgrep -r --include *.pdf searchstring -n

Binary distro package (1.7MB) comes complete with man page, usage examples, changelog.

Developer's site (includes additional PDF-related tools, besides PDFgrep)
http://soft.rubypdf.com/software/pdfgre ... ws-version

PDFgrep Win-32 binary:
http://soft.rubypdf.com/download/pdfgre ... -win32.zip

Tested under WinXP and Win7.

Posts: 260
Joined: Sun Feb 16, 2014 10:54 pm

Re: PDFgrep text search (CLI)

#2 Post by Specular » Thu Oct 05, 2017 6:00 pm

I wonder what the Order purchase drop-down selection is for, commercial use? Doesn't appear to have any explanation.

Posts: 433
Joined: Wed Jun 26, 2013 2:09 am

Re: PDFgrep text search (CLI)

#3 Post by __philippe » Thu Oct 05, 2017 11:54 pm

That's puzzling me too,

the more so considering pdfgrep-1.4.0-win32.zip distribution package includes
  • a COPYING file which is a plain "GNU General Public License".
  • an AUTHORS file pointing to the original product's developers,
      among which Hans-Peter Deifel


it turns out this specific win32 product is actually a fork of the original GNU/Unix PDFgrep maintained by pdfgrep.org ,
plainly labeling itself as "Free Software Licensed under the GPL version 2 or later."
Developer HP Deifel by-line also figures in the version release annoucements.

Go figure... :roll:

Posts: 433
Joined: Wed Jun 26, 2013 2:09 am

Re: PDFgrep text search (CLI)

#4 Post by __philippe » Fri Oct 06, 2017 5:33 am

PDFgrep users,.. Beware :!:

    pdfgrep [OPTION]... PATTERN FILE...
  • FILE names ARE case sensitive, while
  • PATTERN search strings are NOT
Using or not using the -i OPTION parameter to supersede case sensitivity won't make a whiff of difference in this specific implementation,
whatever its PDFgrep.txt man page mumbles about it.

Trust me on this one,
I have been throwing enough of a tantrum :evil: over PDFgrep aberrant parsing of file names before the obvious cause :idea: finally dawned on me ... ;-)

Post Reply