Open a folder
Blog

How to search for text in many PDF files at once

Four ways to find a word or a sentence across a whole folder of PDFs, from Acrobat's folder search to the command line, and what each one misses.

Ctrl+F searches one open PDF. When the sentence you need could be in any of sixty files, you need a search that looks inside all of them at once. There are several, and they differ in two things that matter: whether they find words you didn't type exactly, and whether they can read scanned pages.

๐Ÿ“Š The four options at a glance

Exact wordsDifferent wordingScanned pagesShows the page
Acrobat Reader folder searchโœ…โŒโŒโœ…
Windows Search / Spotlightโœ…โŒโŒโŒ
pdfgrep (command line)โœ…โŒโŒโœ…
AskFolderโœ…โœ…โœ…โœ…

The free Acrobat Reader has an advanced search (Shift+Ctrl+F on Windows, Shift+Cmd+F on a Mac) that can look in "All PDF documents in" a folder you choose.

  • โœ… Good: free, already installed on many computers, shows every match in context.
  • โŒ Misses: it matches the words you typed. Search "notice period" and a clause that says "sixty (60) days' written notice" isn't found. Scanned pages without a text layer are invisible to it.

Windows Search and macOS Spotlight can index the text inside PDFs, so typing a phrase in Explorer or Spotlight lists the files that contain it.

  • โœ… Good: nothing to install, searches every folder at once.
  • โŒ Misses: it tells you which file, not where in it, so you still open each result and press Ctrl+F. On Windows it depends on content indexing being switched on for that folder. Exact words only, and scans are skipped.

3๏ธโƒฃ The command line

For people comfortable in a terminal, pdfgrep searches every PDF in a folder and prints each matching line with its page number: pdfgrep -r -n -i "notice" .

  • โœ… Good: fast, exact, scriptable, regular expressions.
  • โŒ Misses: exact words only, no scans, and not something you'd hand to a colleague.

4๏ธโƒฃ Search by meaning, on your own computer

AskFolder reads the whole folder in your browser and lets you ask in plain words: "how much notice to end the contract", "when does the warranty run out", "who signed the lease".

  • ๐Ÿง  It searches by meaning as well as by words, so "how much notice" also finds "either party may end this agreement by giving two months' notice".
  • ๐Ÿ“„ Each answer is the passage itself, with its file and page number, best match first.
  • ๐Ÿ–จ๏ธ Scanned PDFs and photos are read too (the free version reads the first three scanned pages; Pro reads them all).
  • ๐Ÿ”’ The files are never uploaded: the reading and the searching happen on your computer.

๐Ÿงญ Which one to use

  • You know the exact word: Acrobat's folder search, or pdfgrep.
  • You only need to know which file: Windows Search or Spotlight.
  • You know what it says, not how it's worded: AskFolder.
  • Some of the PDFs are scans: AskFolder.

Keep reading