a lightweight Unix-style CLI for searching text inside PDF files.
pdfgrep is a small command-line utility that extracts text from PDF files using Poppler and searches it for a given pattern.
PDF Text Search — Search for a pattern inside a PDF. Case-Insensitive Search — Ignore letter casing when matching.
Linux, a C++20 compiler, CMake 3.20+, Ninja, pkg-config, and Poppler.
sudo apt update
sudo apt install build-essential cmake ninja-build pkg-config libpoppler-cpp-devgit clone https://github.com/netcrawlerr/pdfgrep.git
cd pdfgrep
cmake --preset release
cmake --build --preset release
sudo cmake --install out/build-releaseVerify:
pdfgrep --versionpdfgrep "C++" "/path/to/Introducing C++.pdf"
case insensitive search:
pdfgrep -i "dante" "The Divine Comedy.pdf"pdfgrep is currently an early-stage project focused on the basic PDF text-search workflow. More functionality will be added over time.
pdfgrep only works with text that can be extracted from a PDF. Scanned or image-only documents may not produce searchable text.
PDF text extraction is handled by Poppler, so results may vary depending on the structure and encoding of the source PDF.
All processing is performed locally. pdfgrep does not upload PDF contents.
See LICENSE.