The command-line tools are provided bysumatrapdf-tool, which is installed next toSumatraPDF.exe. They only work after SumatraPDF has been installed.
To search text in
file.pdf:sumatrapdf-tool grep -i foo file.pdf-i ignores case i.e. does case-insensitive search, which is probably a good default.Other options:
-aignore accents (diacritics)
Search with a regular expression #
sumatrapdf-tool grep -i -G x.* file.pdf-Gsearch pattern is a regex-iyou can combine it with case-insensitive flagx.*is a regular expression that says: every string that starts withx
For all options see sumatrapdf-tool grep.