AptLynx

Command-line tool

pdfgrep

brew/pdfgrep

Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev

Search PDFs for strings matching a regular expression

At a glance

Type
Command-line tool
Install on
macOS, Linux
Last checked
25 Oct 2026, 21:09 UTC

Install it

macOS

brew install pdfgrep

Linux

brew install pdfgrep

Find lines that match pattern in a PDF

pdfgrep pattern file.pdf

Include file name and page number for each matched line

pdfgrep -H -n pattern file.pdf

Do a case-insensitive search for lines that begin with `file_name` and return the first 3 matches

pdfgrep -m 3 -i '^file_name' file.pdf

Related command-line tools

Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents